| 1 |
|
package net.bytebuddy.pool; |
| 2 |
|
|
| 3 |
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; |
| 4 |
|
import net.bytebuddy.description.TypeVariableSource; |
| 5 |
|
import net.bytebuddy.description.annotation.AnnotationDescription; |
| 6 |
|
import net.bytebuddy.description.annotation.AnnotationList; |
| 7 |
|
import net.bytebuddy.description.enumeration.EnumerationDescription; |
| 8 |
|
import net.bytebuddy.description.field.FieldDescription; |
| 9 |
|
import net.bytebuddy.description.field.FieldList; |
| 10 |
|
import net.bytebuddy.description.method.MethodDescription; |
| 11 |
|
import net.bytebuddy.description.method.MethodList; |
| 12 |
|
import net.bytebuddy.description.method.ParameterDescription; |
| 13 |
|
import net.bytebuddy.description.method.ParameterList; |
| 14 |
|
import net.bytebuddy.description.type.PackageDescription; |
| 15 |
|
import net.bytebuddy.description.type.TypeDescription; |
| 16 |
|
import net.bytebuddy.description.type.TypeList; |
| 17 |
|
import net.bytebuddy.dynamic.ClassFileLocator; |
| 18 |
|
import net.bytebuddy.implementation.bytecode.StackSize; |
| 19 |
|
import net.bytebuddy.utility.PropertyDispatcher; |
| 20 |
|
import org.objectweb.asm.*; |
| 21 |
|
import org.objectweb.asm.signature.SignatureReader; |
| 22 |
|
import org.objectweb.asm.signature.SignatureVisitor; |
| 23 |
|
|
| 24 |
|
import java.io.IOException; |
| 25 |
|
import java.lang.annotation.Annotation; |
| 26 |
|
import java.lang.reflect.Array; |
| 27 |
|
import java.lang.reflect.GenericSignatureFormatError; |
| 28 |
|
import java.lang.reflect.Proxy; |
| 29 |
|
import java.util.*; |
| 30 |
|
import java.util.concurrent.ConcurrentHashMap; |
| 31 |
|
import java.util.concurrent.ConcurrentMap; |
| 32 |
|
|
| 33 |
|
import static net.bytebuddy.matcher.ElementMatchers.*; |
| 34 |
|
|
| 35 |
|
|
| 36 |
|
@link |
| 37 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 38 |
|
public interface TypePool { |
| 39 |
|
|
| 40 |
|
|
| 41 |
|
|
| 42 |
|
|
| 43 |
|
@param@link |
| 44 |
|
@link |
| 45 |
|
@return |
| 46 |
|
@link |
| 47 |
|
|
| 48 |
|
Resolution describe(String name); |
| 49 |
|
|
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
void clear(); |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
@link |
| 57 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 58 |
|
interface Resolution { |
| 59 |
|
|
| 60 |
|
|
| 61 |
|
@link |
| 62 |
|
|
| 63 |
|
@return |
| 64 |
|
|
| 65 |
|
boolean isResolved(); |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
@return |
| 72 |
|
|
| 73 |
|
TypeDescription resolve(); |
| 74 |
|
|
| 75 |
|
|
| 76 |
|
@link |
| 77 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
| 78 |
|
class Simple implements Resolution { |
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
private final TypeDescription typeDescription; |
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
|
| 88 |
|
@param |
| 89 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 90 |
54841 |
public Simple(TypeDescription typeDescription) {... |
| 91 |
54841 |
this.typeDescription = typeDescription; |
| 92 |
|
} |
| 93 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 94 |
2055 |
@Override... |
| 95 |
|
public boolean isResolved() { |
| 96 |
2055 |
return true; |
| 97 |
|
} |
| 98 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 99 |
12633 |
@Override... |
| 100 |
|
public TypeDescription resolve() { |
| 101 |
12633 |
return typeDescription; |
| 102 |
|
} |
| 103 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 104 |
5 |
@Override... |
| 105 |
|
public boolean equals(Object other) { |
| 106 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 107 |
|
&& typeDescription.equals(((Simple) other).typeDescription); |
| 108 |
|
} |
| 109 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 110 |
3 |
@Override... |
| 111 |
|
public int hashCode() { |
| 112 |
3 |
return typeDescription.hashCode(); |
| 113 |
|
} |
| 114 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 115 |
3 |
@Override... |
| 116 |
|
public String toString() { |
| 117 |
3 |
return "TypePool.Resolution.Simple{" + |
| 118 |
|
"typeDescription=" + typeDescription + |
| 119 |
|
'}'; |
| 120 |
|
} |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
|
| 124 |
|
@link |
| 125 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
| 126 |
|
class Illegal implements Resolution { |
| 127 |
|
|
| 128 |
|
|
| 129 |
|
|
| 130 |
|
|
| 131 |
|
private final String name; |
| 132 |
|
|
| 133 |
|
|
| 134 |
|
|
| 135 |
|
|
| 136 |
|
@param |
| 137 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 138 |
12441 |
public Illegal(String name) {... |
| 139 |
12441 |
this.name = name; |
| 140 |
|
} |
| 141 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 142 |
12434 |
@Override... |
| 143 |
|
public boolean isResolved() { |
| 144 |
12434 |
return false; |
| 145 |
|
} |
| 146 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 147 |
3 |
@Override... |
| 148 |
|
public TypeDescription resolve() { |
| 149 |
3 |
throw new IllegalStateException("Cannot resolve type description for " + name); |
| 150 |
|
} |
| 151 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 152 |
5 |
@Override... |
| 153 |
|
public boolean equals(Object other) { |
| 154 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 155 |
|
&& name.equals(((Illegal) other).name); |
| 156 |
|
} |
| 157 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 158 |
3 |
@Override... |
| 159 |
|
public int hashCode() { |
| 160 |
3 |
return name.hashCode(); |
| 161 |
|
} |
| 162 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 163 |
3 |
@Override... |
| 164 |
|
public String toString() { |
| 165 |
3 |
return "TypePool.Resolution.Illegal{" + |
| 166 |
|
"name='" + name + '\'' + |
| 167 |
|
'}'; |
| 168 |
|
} |
| 169 |
|
} |
| 170 |
|
} |
| 171 |
|
|
| 172 |
|
|
| 173 |
|
@link |
| 174 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 175 |
|
interface CacheProvider { |
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
Resolution UNRESOLVED = null; |
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 185 |
|
@param |
| 186 |
|
@return |
| 187 |
|
|
| 188 |
|
Resolution find(String name); |
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 192 |
|
|
| 193 |
|
|
| 194 |
|
@param |
| 195 |
|
@param |
| 196 |
|
@return |
| 197 |
|
|
| 198 |
|
|
| 199 |
|
Resolution register(String name, Resolution resolution); |
| 200 |
|
|
| 201 |
|
|
| 202 |
|
|
| 203 |
|
|
| 204 |
|
void clear(); |
| 205 |
|
|
| 206 |
|
|
| 207 |
|
|
| 208 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 4 |
Complexity Density: 1.33 |
|
| 209 |
|
enum NoOp implements CacheProvider { |
| 210 |
|
|
| 211 |
|
|
| 212 |
|
|
| 213 |
|
|
| 214 |
|
INSTANCE; |
| 215 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 216 |
52528 |
@Override... |
| 217 |
|
public Resolution find(String name) { |
| 218 |
52528 |
return UNRESOLVED; |
| 219 |
|
} |
| 220 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 221 |
52527 |
@Override... |
| 222 |
|
public Resolution register(String name, Resolution resolution) { |
| 223 |
52527 |
return resolution; |
| 224 |
|
} |
| 225 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 226 |
1130 |
@Override... |
| 227 |
|
public void clear() { |
| 228 |
|
|
| 229 |
|
} |
| 230 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 231 |
6 |
@Override... |
| 232 |
|
public String toString() { |
| 233 |
6 |
return "TypePool.CacheProvider.NoOp." + name(); |
| 234 |
|
} |
| 235 |
|
} |
| 236 |
|
|
| 237 |
|
|
| 238 |
|
@link |
| 239 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (17) |
Complexity: 7 |
Complexity Density: 0.78 |
|
| 240 |
|
class Simple implements CacheProvider { |
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 245 |
|
private final ConcurrentMap<String, Resolution> cache; |
| 246 |
|
|
| 247 |
|
|
| 248 |
|
|
| 249 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 250 |
48961 |
public Simple() {... |
| 251 |
48961 |
cache = new ConcurrentHashMap<String, Resolution>(); |
| 252 |
|
} |
| 253 |
|
|
| 254 |
|
|
| 255 |
|
@link |
| 256 |
|
|
| 257 |
|
@return@link |
| 258 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 259 |
48133 |
public static CacheProvider withObjectType() {... |
| 260 |
48133 |
CacheProvider cacheProvider = new Simple(); |
| 261 |
48133 |
cacheProvider.register(Object.class.getName(), new Resolution.Simple(TypeDescription.OBJECT)); |
| 262 |
48133 |
return cacheProvider; |
| 263 |
|
} |
| 264 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 265 |
6879 |
@Override... |
| 266 |
|
public Resolution find(String name) { |
| 267 |
6879 |
return cache.get(name); |
| 268 |
|
} |
| 269 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 270 |
49078 |
@Override... |
| 271 |
|
public Resolution register(String name, Resolution resolution) { |
| 272 |
49078 |
Resolution cached = cache.putIfAbsent(name, resolution); |
| 273 |
49078 |
return cached == null |
| 274 |
|
? resolution |
| 275 |
|
: cached; |
| 276 |
|
} |
| 277 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 278 |
251 |
@Override... |
| 279 |
|
public void clear() { |
| 280 |
251 |
cache.clear(); |
| 281 |
|
} |
| 282 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 283 |
3 |
@Override... |
| 284 |
|
public String toString() { |
| 285 |
3 |
return "TypePool.CacheProvider.Simple{cache=" + cache + '}'; |
| 286 |
|
} |
| 287 |
|
} |
| 288 |
|
} |
| 289 |
|
|
| 290 |
|
|
| 291 |
|
|
| 292 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 3 |
Complexity Density: 1.5 |
|
| 293 |
|
enum Empty implements TypePool { |
| 294 |
|
|
| 295 |
|
|
| 296 |
|
|
| 297 |
|
|
| 298 |
|
INSTANCE; |
| 299 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 300 |
12423 |
@Override... |
| 301 |
|
public Resolution describe(String name) { |
| 302 |
12423 |
return new Resolution.Illegal(name); |
| 303 |
|
} |
| 304 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 305 |
1380 |
@Override... |
| 306 |
|
public void clear() { |
| 307 |
|
|
| 308 |
|
} |
| 309 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 310 |
0 |
@Override... |
| 311 |
|
public String toString() { |
| 312 |
0 |
return "TypePool.Empty." + name(); |
| 313 |
|
} |
| 314 |
|
} |
| 315 |
|
|
| 316 |
|
|
| 317 |
|
@link |
| 318 |
|
|
| 319 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (43) |
Complexity: 12 |
Complexity Density: 0.48 |
|
| 320 |
|
abstract class AbstractBase implements TypePool { |
| 321 |
|
|
| 322 |
|
|
| 323 |
|
|
| 324 |
|
|
| 325 |
|
protected static final Map<String, TypeDescription> PRIMITIVE_TYPES; |
| 326 |
|
|
| 327 |
|
|
| 328 |
|
|
| 329 |
|
|
| 330 |
|
protected static final Map<String, String> PRIMITIVE_DESCRIPTORS; |
| 331 |
|
|
| 332 |
|
|
| 333 |
|
|
| 334 |
|
|
| 335 |
|
private static final String ARRAY_SYMBOL = "["; |
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 340 |
3 |
static {... |
| 341 |
3 |
Map<String, TypeDescription> primitiveTypes = new HashMap<String, TypeDescription>(); |
| 342 |
3 |
Map<String, String> primitiveDescriptors = new HashMap<String, String>(); |
| 343 |
3 |
for (Class<?> primitiveType : new Class<?>[]{boolean.class, |
| 344 |
|
byte.class, |
| 345 |
|
short.class, |
| 346 |
|
char.class, |
| 347 |
|
int.class, |
| 348 |
|
long.class, |
| 349 |
|
float.class, |
| 350 |
|
double.class, |
| 351 |
|
void.class}) { |
| 352 |
27 |
primitiveTypes.put(primitiveType.getName(), new TypeDescription.ForLoadedType(primitiveType)); |
| 353 |
27 |
primitiveDescriptors.put(Type.getDescriptor(primitiveType), primitiveType.getName()); |
| 354 |
|
} |
| 355 |
3 |
PRIMITIVE_TYPES = Collections.unmodifiableMap(primitiveTypes); |
| 356 |
3 |
PRIMITIVE_DESCRIPTORS = Collections.unmodifiableMap(primitiveDescriptors); |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
|
| 360 |
|
|
| 361 |
|
|
| 362 |
|
protected final CacheProvider cacheProvider; |
| 363 |
|
|
| 364 |
|
|
| 365 |
|
|
| 366 |
|
|
| 367 |
|
@param |
| 368 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 369 |
124067 |
protected AbstractBase(CacheProvider cacheProvider) {... |
| 370 |
124067 |
this.cacheProvider = cacheProvider; |
| 371 |
|
} |
| 372 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (26) |
Complexity: 7 |
Complexity Density: 0.5 |
|
| 373 |
61099 |
@Override... |
| 374 |
|
public Resolution describe(String name) { |
| 375 |
61099 |
if (name.contains("/")) { |
| 376 |
1 |
throw new IllegalArgumentException(name + " contains the illegal character '/'"); |
| 377 |
|
} |
| 378 |
61098 |
int arity = 0; |
| 379 |
66420 |
while (name.startsWith(ARRAY_SYMBOL)) { |
| 380 |
5322 |
arity++; |
| 381 |
5322 |
name = name.substring(1); |
| 382 |
|
} |
| 383 |
61098 |
if (arity > 0) { |
| 384 |
5216 |
String primitiveName = PRIMITIVE_DESCRIPTORS.get(name); |
| 385 |
5216 |
name = primitiveName == null |
| 386 |
|
? name.substring(1, name.length() - 1) |
| 387 |
|
: primitiveName; |
| 388 |
|
} |
| 389 |
61098 |
TypeDescription typeDescription = PRIMITIVE_TYPES.get(name); |
| 390 |
61098 |
Resolution resolution = typeDescription == null |
| 391 |
|
? cacheProvider.find(name) |
| 392 |
|
: new Resolution.Simple(typeDescription); |
| 393 |
61098 |
if (resolution == null) { |
| 394 |
53469 |
resolution = cacheProvider.register(name, doDescribe(name)); |
| 395 |
|
} |
| 396 |
61098 |
return ArrayTypeResolution.of(resolution, arity); |
| 397 |
|
} |
| 398 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 399 |
1380 |
@Override... |
| 400 |
|
public void clear() { |
| 401 |
1380 |
cacheProvider.clear(); |
| 402 |
|
} |
| 403 |
|
|
| 404 |
|
|
| 405 |
|
|
| 406 |
|
|
| 407 |
|
@param |
| 408 |
|
@return |
| 409 |
|
|
| 410 |
|
protected abstract Resolution doDescribe(String name); |
| 411 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 412 |
24 |
@Override... |
| 413 |
|
public boolean equals(Object other) { |
| 414 |
24 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 415 |
|
&& cacheProvider.equals(((AbstractBase) other).cacheProvider); |
| 416 |
|
} |
| 417 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 418 |
25 |
@Override... |
| 419 |
|
public int hashCode() { |
| 420 |
25 |
return cacheProvider.hashCode(); |
| 421 |
|
} |
| 422 |
|
|
| 423 |
|
|
| 424 |
|
|
| 425 |
|
|
| 426 |
|
|
| 427 |
|
|
| |
|
| 87.1% |
Uncovered Elements: 4 (31) |
Complexity: 10 |
Complexity Density: 0.56 |
|
| 428 |
|
public abstract static class Hierarchical extends AbstractBase { |
| 429 |
|
|
| 430 |
|
|
| 431 |
|
|
| 432 |
|
|
| 433 |
|
private final TypePool parent; |
| 434 |
|
|
| 435 |
|
|
| 436 |
|
|
| 437 |
|
|
| 438 |
|
@param |
| 439 |
|
@param |
| 440 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 441 |
75377 |
protected Hierarchical(CacheProvider cacheProvider, TypePool parent) {... |
| 442 |
75377 |
super(cacheProvider); |
| 443 |
75377 |
this.parent = parent; |
| 444 |
|
} |
| 445 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 446 |
13274 |
@Override... |
| 447 |
|
public Resolution describe(String name) { |
| 448 |
13274 |
Resolution resolution = parent.describe(name); |
| 449 |
13274 |
return resolution.isResolved() |
| 450 |
|
? resolution |
| 451 |
|
: super.describe(name); |
| 452 |
|
} |
| 453 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 454 |
1380 |
@Override... |
| 455 |
|
public void clear() { |
| 456 |
1380 |
try { |
| 457 |
1380 |
parent.clear(); |
| 458 |
|
} finally { |
| 459 |
1380 |
super.clear(); |
| 460 |
|
} |
| 461 |
|
} |
| 462 |
|
|
| |
|
| 71.4% |
Uncovered Elements: 4 (14) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 463 |
24 |
@Override... |
| 464 |
|
public boolean equals(Object object) { |
| 465 |
24 |
if (this == object) return true; |
| 466 |
24 |
if (object == null || getClass() != object.getClass()) return false; |
| 467 |
6 |
if (!super.equals(object)) return false; |
| 468 |
18 |
Hierarchical that = (Hierarchical) object; |
| 469 |
18 |
return parent.equals(that.parent); |
| 470 |
|
} |
| 471 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 472 |
25 |
@Override... |
| 473 |
|
public int hashCode() { |
| 474 |
25 |
int result = super.hashCode(); |
| 475 |
25 |
result = 31 * result + parent.hashCode(); |
| 476 |
25 |
return result; |
| 477 |
|
} |
| 478 |
|
} |
| 479 |
|
|
| 480 |
|
|
| 481 |
|
|
| 482 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (19) |
Complexity: 8 |
Complexity Density: 0.8 |
|
| 483 |
|
protected static class ArrayTypeResolution implements Resolution { |
| 484 |
|
|
| 485 |
|
|
| 486 |
|
|
| 487 |
|
|
| 488 |
|
private final Resolution resolution; |
| 489 |
|
|
| 490 |
|
|
| 491 |
|
|
| 492 |
|
|
| 493 |
|
private final int arity; |
| 494 |
|
|
| 495 |
|
|
| 496 |
|
|
| 497 |
|
|
| 498 |
|
@param |
| 499 |
|
@param |
| 500 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 501 |
5222 |
protected ArrayTypeResolution(Resolution resolution, int arity) {... |
| 502 |
5222 |
this.resolution = resolution; |
| 503 |
5222 |
this.arity = arity; |
| 504 |
|
} |
| 505 |
|
|
| 506 |
|
|
| 507 |
|
|
| 508 |
|
|
| 509 |
|
|
| 510 |
|
|
| 511 |
|
@param |
| 512 |
|
@param |
| 513 |
|
@return |
| 514 |
|
|
| 515 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 516 |
61101 |
protected static Resolution of(Resolution resolution, int arity) {... |
| 517 |
61101 |
return arity == 0 |
| 518 |
|
? resolution |
| 519 |
|
: new ArrayTypeResolution(resolution, arity); |
| 520 |
|
} |
| 521 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 522 |
2 |
@Override... |
| 523 |
|
public boolean isResolved() { |
| 524 |
2 |
return resolution.isResolved(); |
| 525 |
|
} |
| 526 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 527 |
5217 |
@Override... |
| 528 |
|
public TypeDescription resolve() { |
| 529 |
5217 |
return TypeDescription.ArrayProjection.of(resolution.resolve(), arity); |
| 530 |
|
} |
| 531 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 532 |
7 |
@Override... |
| 533 |
|
public boolean equals(Object other) { |
| 534 |
7 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 535 |
|
&& arity == ((ArrayTypeResolution) other).arity |
| 536 |
|
&& resolution.equals(((ArrayTypeResolution) other).resolution); |
| 537 |
|
} |
| 538 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 539 |
4 |
@Override... |
| 540 |
|
public int hashCode() { |
| 541 |
4 |
int result = resolution.hashCode(); |
| 542 |
4 |
result = 31 * result + arity; |
| 543 |
4 |
return result; |
| 544 |
|
} |
| 545 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 546 |
4 |
@Override... |
| 547 |
|
public String toString() { |
| 548 |
4 |
return "TypePool.AbstractBase.ArrayTypeResolution{" + |
| 549 |
|
"resolution=" + resolution + |
| 550 |
|
", arity=" + arity + |
| 551 |
|
'}'; |
| 552 |
|
} |
| 553 |
|
} |
| 554 |
|
|
| 555 |
|
|
| 556 |
|
|
| 557 |
|
|
| |
|
| 55.6% |
Uncovered Elements: 8 (18) |
Complexity: 7 |
Complexity Density: 0.7 |
|
| 558 |
|
protected static class RawAnnotationValue implements AnnotationDescription.AnnotationValue<AnnotationDescription, Annotation> { |
| 559 |
|
|
| 560 |
|
|
| 561 |
|
|
| 562 |
|
|
| 563 |
|
private final TypePool typePool; |
| 564 |
|
|
| 565 |
|
|
| 566 |
|
|
| 567 |
|
|
| 568 |
|
private final Default.LazyTypeDescription.AnnotationToken annotationToken; |
| 569 |
|
|
| 570 |
|
|
| 571 |
|
|
| 572 |
|
|
| 573 |
|
@param |
| 574 |
|
@param |
| 575 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 576 |
56 |
public RawAnnotationValue(TypePool typePool, Default.LazyTypeDescription.AnnotationToken annotationToken) {... |
| 577 |
56 |
this.typePool = typePool; |
| 578 |
56 |
this.annotationToken = annotationToken; |
| 579 |
|
} |
| 580 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 581 |
46 |
@Override... |
| 582 |
|
public AnnotationDescription resolve() { |
| 583 |
46 |
return annotationToken.toAnnotationDescription(typePool).resolve(); |
| 584 |
|
} |
| 585 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 586 |
178 |
@Override... |
| 587 |
|
@SuppressWarnings("unchecked") |
| 588 |
|
public Loaded<Annotation> load(ClassLoader classLoader) throws ClassNotFoundException { |
| 589 |
178 |
Class<?> type = classLoader.loadClass(annotationToken.getBinaryName()); |
| 590 |
178 |
if (type.isAnnotation()) { |
| 591 |
178 |
return new ForAnnotation.Loaded<Annotation>((Annotation) Proxy.newProxyInstance(classLoader, |
| 592 |
|
new Class<?>[]{type}, |
| 593 |
|
AnnotationDescription.AnnotationInvocationHandler.of(classLoader, |
| 594 |
|
(Class<? extends Annotation>) type, |
| 595 |
|
annotationToken.getValues()))); |
| 596 |
|
} else { |
| 597 |
0 |
return new ForAnnotation.IncompatibleRuntimeType(type); |
| 598 |
|
} |
| 599 |
|
} |
| 600 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 601 |
0 |
@Override... |
| 602 |
|
public boolean equals(Object other) { |
| 603 |
0 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 604 |
|
&& annotationToken.equals(((RawAnnotationValue) other).annotationToken); |
| 605 |
|
} |
| 606 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 607 |
0 |
@Override... |
| 608 |
|
public int hashCode() { |
| 609 |
0 |
return annotationToken.hashCode(); |
| 610 |
|
} |
| 611 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 612 |
0 |
@Override... |
| 613 |
|
public String toString() { |
| 614 |
0 |
return "TypePool.AbstractBase.RawAnnotationValue{" + |
| 615 |
|
"annotationToken=" + annotationToken + |
| 616 |
|
'}'; |
| 617 |
|
} |
| 618 |
|
} |
| 619 |
|
|
| 620 |
|
|
| 621 |
|
|
| 622 |
|
|
| |
|
| 57.9% |
Uncovered Elements: 8 (19) |
Complexity: 8 |
Complexity Density: 0.73 |
|
| 623 |
|
protected static class RawEnumerationValue implements AnnotationDescription.AnnotationValue<EnumerationDescription, Enum<?>> { |
| 624 |
|
|
| 625 |
|
|
| 626 |
|
|
| 627 |
|
|
| 628 |
|
private final TypePool typePool; |
| 629 |
|
|
| 630 |
|
|
| 631 |
|
|
| 632 |
|
|
| 633 |
|
private final String descriptor; |
| 634 |
|
|
| 635 |
|
|
| 636 |
|
|
| 637 |
|
|
| 638 |
|
private final String value; |
| 639 |
|
|
| 640 |
|
|
| 641 |
|
|
| 642 |
|
|
| 643 |
|
@param |
| 644 |
|
@param |
| 645 |
|
@param |
| 646 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 647 |
1810 |
public RawEnumerationValue(TypePool typePool, String descriptor, String value) {... |
| 648 |
1810 |
this.typePool = typePool; |
| 649 |
1810 |
this.descriptor = descriptor; |
| 650 |
1810 |
this.value = value; |
| 651 |
|
} |
| 652 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 653 |
69 |
@Override... |
| 654 |
|
public EnumerationDescription resolve() { |
| 655 |
69 |
return new LazyEnumerationDescription(); |
| 656 |
|
} |
| 657 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 658 |
180 |
@Override... |
| 659 |
|
@SuppressWarnings("unchecked") |
| 660 |
|
public Loaded<Enum<?>> load(ClassLoader classLoader) throws ClassNotFoundException { |
| 661 |
180 |
Class<?> type = classLoader.loadClass(descriptor.substring(1, descriptor.length() - 1).replace('/', '.')); |
| 662 |
180 |
try { |
| 663 |
180 |
return type.isEnum() |
| 664 |
|
? new ForEnumeration.Loaded(Enum.valueOf((Class) type, value)) |
| 665 |
|
: new ForEnumeration.IncompatibleRuntimeType(type); |
| 666 |
|
} catch (IllegalArgumentException ignored) { |
| 667 |
0 |
return new ForEnumeration.UnknownRuntimeEnumeration((Class) type, value); |
| 668 |
|
} |
| 669 |
|
} |
| 670 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 671 |
0 |
@Override... |
| 672 |
|
public boolean equals(Object other) { |
| 673 |
0 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 674 |
|
&& descriptor.equals(((RawEnumerationValue) other).descriptor) |
| 675 |
|
&& value.equals(((RawEnumerationValue) other).value); |
| 676 |
|
} |
| 677 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 678 |
0 |
@Override... |
| 679 |
|
public int hashCode() { |
| 680 |
0 |
return 31 * descriptor.hashCode() + value.hashCode(); |
| 681 |
|
} |
| 682 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 683 |
0 |
@Override... |
| 684 |
|
public String toString() { |
| 685 |
0 |
return "TypePool.DefaultLazyTypeDescription.AnnotationValue.ForEnumeration{" + |
| 686 |
|
"descriptor='" + descriptor + '\'' + |
| 687 |
|
", value='" + value + '\'' + |
| 688 |
|
'}'; |
| 689 |
|
} |
| 690 |
|
|
| 691 |
|
|
| 692 |
|
|
| 693 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 3 |
Complexity Density: 1 |
|
| 694 |
|
protected class LazyEnumerationDescription extends EnumerationDescription.AbstractBase { |
| 695 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 696 |
58 |
@Override... |
| 697 |
|
public String getValue() { |
| 698 |
58 |
return value; |
| 699 |
|
} |
| 700 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 701 |
56 |
@Override... |
| 702 |
|
public TypeDescription getEnumerationType() { |
| 703 |
56 |
return typePool.describe(descriptor.substring(1, descriptor.length() - 1).replace('/', '.')).resolve(); |
| 704 |
|
} |
| 705 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 706 |
2 |
@Override... |
| 707 |
|
public <T extends Enum<T>> T load(Class<T> type) { |
| 708 |
2 |
return Enum.valueOf(type, value); |
| 709 |
|
} |
| 710 |
|
} |
| 711 |
|
} |
| 712 |
|
|
| 713 |
|
|
| 714 |
|
|
| 715 |
|
|
| |
|
| 60% |
Uncovered Elements: 6 (15) |
Complexity: 7 |
Complexity Density: 1 |
|
| 716 |
|
protected static class RawTypeValue implements AnnotationDescription.AnnotationValue<TypeDescription, Class<?>> { |
| 717 |
|
|
| 718 |
|
|
| 719 |
|
|
| 720 |
|
|
| 721 |
|
private static final boolean NO_INITIALIZATION = false; |
| 722 |
|
|
| 723 |
|
|
| 724 |
|
|
| 725 |
|
|
| 726 |
|
private final TypePool typePool; |
| 727 |
|
|
| 728 |
|
|
| 729 |
|
|
| 730 |
|
|
| 731 |
|
private final String name; |
| 732 |
|
|
| 733 |
|
|
| 734 |
|
|
| 735 |
|
|
| 736 |
|
@param |
| 737 |
|
@param |
| 738 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 739 |
5405 |
public RawTypeValue(TypePool typePool, Type type) {... |
| 740 |
5405 |
this.typePool = typePool; |
| 741 |
5405 |
name = type.getSort() == Type.ARRAY |
| 742 |
|
? type.getInternalName().replace('/', '.') |
| 743 |
|
: type.getClassName(); |
| 744 |
|
} |
| 745 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 746 |
70 |
@Override... |
| 747 |
|
public TypeDescription resolve() { |
| 748 |
70 |
return typePool.describe(name).resolve(); |
| 749 |
|
} |
| 750 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 751 |
267 |
@Override... |
| 752 |
|
public AnnotationDescription.AnnotationValue.Loaded<Class<?>> load(ClassLoader classLoader) throws ClassNotFoundException { |
| 753 |
267 |
return new Loaded(Class.forName(name, NO_INITIALIZATION, classLoader)); |
| 754 |
|
} |
| 755 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 756 |
0 |
@Override... |
| 757 |
|
public boolean equals(Object other) { |
| 758 |
0 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 759 |
|
&& name.equals(((RawTypeValue) other).name); |
| 760 |
|
} |
| 761 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 762 |
0 |
@Override... |
| 763 |
|
public int hashCode() { |
| 764 |
0 |
return name.hashCode(); |
| 765 |
|
} |
| 766 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 767 |
0 |
@Override... |
| 768 |
|
public String toString() { |
| 769 |
0 |
return "TypePool.DefaultLazyTypeDescription.AnnotationValue.ForType{" + |
| 770 |
|
"name='" + name + '\'' + |
| 771 |
|
'}'; |
| 772 |
|
} |
| 773 |
|
|
| 774 |
|
|
| 775 |
|
|
| 776 |
|
|
| |
|
| 81% |
Uncovered Elements: 4 (21) |
Complexity: 8 |
Complexity Density: 0.73 |
|
| 777 |
|
protected static class Loaded implements AnnotationDescription.AnnotationValue.Loaded<Class<?>> { |
| 778 |
|
|
| 779 |
|
|
| 780 |
|
|
| 781 |
|
|
| 782 |
|
private final Class<?> type; |
| 783 |
|
|
| 784 |
|
|
| 785 |
|
|
| 786 |
|
|
| 787 |
|
@param |
| 788 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 789 |
267 |
public Loaded(Class<?> type) {... |
| 790 |
267 |
this.type = type; |
| 791 |
|
} |
| 792 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 793 |
32 |
@Override... |
| 794 |
|
public State getState() { |
| 795 |
32 |
return State.RESOLVED; |
| 796 |
|
} |
| 797 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 798 |
26 |
@Override... |
| 799 |
|
public Class<?> resolve() { |
| 800 |
26 |
return type; |
| 801 |
|
} |
| 802 |
|
|
| |
|
| 60% |
Uncovered Elements: 4 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
| 803 |
4 |
@Override... |
| 804 |
|
public boolean equals(Object other) { |
| 805 |
4 |
if (this == other) return true; |
| 806 |
4 |
if (!(other instanceof AnnotationDescription.AnnotationValue.Loaded<?>)) return false; |
| 807 |
4 |
AnnotationDescription.AnnotationValue.Loaded<?> loadedOther = (AnnotationDescription.AnnotationValue.Loaded<?>) other; |
| 808 |
4 |
return loadedOther.getState().isResolved() && type.equals(loadedOther.resolve()); |
| 809 |
|
} |
| 810 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 811 |
9 |
@Override... |
| 812 |
|
public int hashCode() { |
| 813 |
9 |
return type.hashCode(); |
| 814 |
|
} |
| 815 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 816 |
6 |
@Override... |
| 817 |
|
public String toString() { |
| 818 |
6 |
return type.toString(); |
| 819 |
|
} |
| 820 |
|
} |
| 821 |
|
} |
| 822 |
|
|
| 823 |
|
|
| 824 |
|
|
| 825 |
|
|
| |
|
| 80% |
Uncovered Elements: 8 (40) |
Complexity: 10 |
Complexity Density: 0.38 |
|
| 826 |
|
protected static class RawNonPrimitiveArray implements AnnotationDescription.AnnotationValue<Object[], Object[]> { |
| 827 |
|
|
| 828 |
|
|
| 829 |
|
|
| 830 |
|
|
| 831 |
|
private final TypePool typePool; |
| 832 |
|
|
| 833 |
|
|
| 834 |
|
|
| 835 |
|
|
| 836 |
|
private final ComponentTypeReference componentTypeReference; |
| 837 |
|
|
| 838 |
|
|
| 839 |
|
|
| 840 |
|
|
| 841 |
|
private List<AnnotationDescription.AnnotationValue<?, ?>> value; |
| 842 |
|
|
| 843 |
|
|
| 844 |
|
|
| 845 |
|
|
| 846 |
|
@param |
| 847 |
|
@param |
| 848 |
|
@param |
| 849 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 850 |
639 |
public RawNonPrimitiveArray(TypePool typePool,... |
| 851 |
|
ComponentTypeReference componentTypeReference, |
| 852 |
|
List<AnnotationDescription.AnnotationValue<?, ?>> value) { |
| 853 |
639 |
this.typePool = typePool; |
| 854 |
639 |
this.value = value; |
| 855 |
639 |
this.componentTypeReference = componentTypeReference; |
| 856 |
|
} |
| 857 |
|
|
| |
|
| 91.7% |
Uncovered Elements: 2 (24) |
Complexity: 5 |
Complexity Density: 0.31 |
|
| 858 |
92 |
@Override... |
| 859 |
|
public Object[] resolve() { |
| 860 |
92 |
TypeDescription componentTypeDescription = typePool.describe(componentTypeReference.lookup()).resolve(); |
| 861 |
92 |
Class<?> componentType; |
| 862 |
92 |
if (componentTypeDescription.represents(Class.class)) { |
| 863 |
23 |
componentType = TypeDescription.class; |
| 864 |
69 |
} else if (componentTypeDescription.isAssignableTo(Enum.class)) { |
| 865 |
23 |
componentType = EnumerationDescription.class; |
| 866 |
46 |
} else if (componentTypeDescription.isAssignableTo(Annotation.class)) { |
| 867 |
23 |
componentType = AnnotationDescription.class; |
| 868 |
23 |
} else if (componentTypeDescription.represents(String.class)) { |
| 869 |
23 |
componentType = String.class; |
| 870 |
|
} else { |
| 871 |
0 |
throw new IllegalStateException("Unexpected complex array component type " + componentTypeDescription); |
| 872 |
|
} |
| 873 |
92 |
Object[] array = (Object[]) Array.newInstance(componentType, value.size()); |
| 874 |
92 |
int index = 0; |
| 875 |
92 |
for (AnnotationDescription.AnnotationValue<?, ?> annotationValue : value) { |
| 876 |
92 |
Array.set(array, index++, annotationValue.resolve()); |
| 877 |
|
} |
| 878 |
92 |
return array; |
| 879 |
|
} |
| 880 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 881 |
356 |
@Override... |
| 882 |
|
public AnnotationDescription.AnnotationValue.Loaded<Object[]> load(ClassLoader classLoader) throws ClassNotFoundException { |
| 883 |
356 |
List<AnnotationDescription.AnnotationValue.Loaded<?>> loadedValues = new ArrayList<AnnotationDescription.AnnotationValue.Loaded<?>>(value.size()); |
| 884 |
356 |
for (AnnotationDescription.AnnotationValue<?, ?> value : this.value) { |
| 885 |
356 |
loadedValues.add(value.load(classLoader)); |
| 886 |
|
} |
| 887 |
356 |
return new Loaded(classLoader.loadClass(componentTypeReference.lookup()), loadedValues); |
| 888 |
|
} |
| 889 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 890 |
0 |
@Override... |
| 891 |
|
public boolean equals(Object other) { |
| 892 |
0 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 893 |
|
&& componentTypeReference.equals(((RawNonPrimitiveArray) other).componentTypeReference) |
| 894 |
|
&& value.equals(((RawNonPrimitiveArray) other).value); |
| 895 |
|
} |
| 896 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 897 |
0 |
@Override... |
| 898 |
|
public int hashCode() { |
| 899 |
0 |
return 31 * value.hashCode() + componentTypeReference.hashCode(); |
| 900 |
|
} |
| 901 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 902 |
0 |
@Override... |
| 903 |
|
public String toString() { |
| 904 |
0 |
return "TypePool.DefaultLazyTypeDescription.AnnotationValue.ForComplexArray{" + |
| 905 |
|
"value=" + value + |
| 906 |
|
", componentTypeReference=" + componentTypeReference + |
| 907 |
|
'}'; |
| 908 |
|
} |
| 909 |
|
|
| 910 |
|
|
| 911 |
|
|
| 912 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 913 |
|
public interface ComponentTypeReference { |
| 914 |
|
|
| 915 |
|
|
| 916 |
|
|
| 917 |
|
|
| 918 |
|
@return |
| 919 |
|
|
| 920 |
|
String lookup(); |
| 921 |
|
} |
| 922 |
|
|
| 923 |
|
|
| 924 |
|
|
| 925 |
|
|
| |
|
| 75.9% |
Uncovered Elements: 14 (58) |
Complexity: 14 |
Complexity Density: 0.37 |
|
| 926 |
|
protected static class Loaded implements AnnotationDescription.AnnotationValue.Loaded<Object[]> { |
| 927 |
|
|
| 928 |
|
|
| 929 |
|
|
| 930 |
|
|
| 931 |
|
private final Class<?> componentType; |
| 932 |
|
|
| 933 |
|
|
| 934 |
|
|
| 935 |
|
|
| 936 |
|
private final List<AnnotationDescription.AnnotationValue.Loaded<?>> values; |
| 937 |
|
|
| 938 |
|
|
| 939 |
|
|
| 940 |
|
|
| 941 |
|
|
| 942 |
|
@param |
| 943 |
|
@param |
| 944 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 945 |
356 |
public Loaded(Class<?> componentType, List<AnnotationDescription.AnnotationValue.Loaded<?>> values) {... |
| 946 |
356 |
this.componentType = componentType; |
| 947 |
356 |
this.values = values; |
| 948 |
|
} |
| 949 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 950 |
40 |
@Override... |
| 951 |
|
public State getState() { |
| 952 |
40 |
for (AnnotationDescription.AnnotationValue.Loaded<?> value : values) { |
| 953 |
40 |
if (!value.getState().isResolved()) { |
| 954 |
0 |
return State.NON_RESOLVED; |
| 955 |
|
} |
| 956 |
|
} |
| 957 |
40 |
return State.RESOLVED; |
| 958 |
|
} |
| 959 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 960 |
32 |
@Override... |
| 961 |
|
public Object[] resolve() { |
| 962 |
32 |
Object[] array = (Object[]) Array.newInstance(componentType, values.size()); |
| 963 |
32 |
int index = 0; |
| 964 |
32 |
for (AnnotationDescription.AnnotationValue.Loaded<?> annotationValue : values) { |
| 965 |
32 |
Array.set(array, index++, annotationValue.resolve()); |
| 966 |
|
} |
| 967 |
32 |
return array; |
| 968 |
|
} |
| 969 |
|
|
| |
|
| 61.3% |
Uncovered Elements: 12 (31) |
Complexity: 8 |
Complexity Density: 0.42 |
|
| 970 |
8 |
@Override... |
| 971 |
|
public boolean equals(Object other) { |
| 972 |
8 |
if (this == other) return true; |
| 973 |
8 |
if (!(other instanceof AnnotationDescription.AnnotationValue.Loaded<?>)) return false; |
| 974 |
8 |
AnnotationDescription.AnnotationValue.Loaded<?> loadedOther = (AnnotationDescription.AnnotationValue.Loaded<?>) other; |
| 975 |
8 |
if (!loadedOther.getState().isResolved()) return false; |
| 976 |
8 |
Object otherValue = loadedOther.resolve(); |
| 977 |
8 |
if (!(otherValue instanceof Object[])) return false; |
| 978 |
8 |
Object[] otherArrayValue = (Object[]) otherValue; |
| 979 |
8 |
if (values.size() != otherArrayValue.length) return false; |
| 980 |
8 |
Iterator<AnnotationDescription.AnnotationValue.Loaded<?>> iterator = values.iterator(); |
| 981 |
8 |
for (Object value : otherArrayValue) { |
| 982 |
8 |
AnnotationDescription.AnnotationValue.Loaded<?> self = iterator.next(); |
| 983 |
8 |
if (!self.getState().isResolved() || !self.resolve().equals(value)) { |
| 984 |
0 |
return false; |
| 985 |
|
} |
| 986 |
|
} |
| 987 |
8 |
return true; |
| 988 |
|
} |
| 989 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 990 |
12 |
@Override... |
| 991 |
|
public int hashCode() { |
| 992 |
12 |
int result = 1; |
| 993 |
12 |
for (AnnotationDescription.AnnotationValue.Loaded<?> value : values) { |
| 994 |
12 |
result = 31 * result + value.hashCode(); |
| 995 |
|
} |
| 996 |
12 |
return result; |
| 997 |
|
} |
| 998 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 999 |
8 |
@Override... |
| 1000 |
|
public String toString() { |
| 1001 |
8 |
StringBuilder stringBuilder = new StringBuilder("["); |
| 1002 |
8 |
for (AnnotationDescription.AnnotationValue.Loaded<?> value : values) { |
| 1003 |
8 |
stringBuilder.append(value.toString()); |
| 1004 |
|
} |
| 1005 |
8 |
return stringBuilder.append("]").toString(); |
| 1006 |
|
} |
| 1007 |
|
} |
| 1008 |
|
} |
| 1009 |
|
} |
| 1010 |
|
|
| 1011 |
|
|
| 1012 |
|
@link |
| 1013 |
|
@link |
| 1014 |
|
@link |
| 1015 |
|
|
| |
|
| 90% |
Uncovered Elements: 3 (30) |
Complexity: 12 |
Complexity Density: 0.67 |
|
| 1016 |
|
class Default extends AbstractBase.Hierarchical { |
| 1017 |
|
|
| 1018 |
|
|
| 1019 |
|
|
| 1020 |
|
|
| 1021 |
|
private static final MethodVisitor IGNORE_METHOD = null; |
| 1022 |
|
|
| 1023 |
|
|
| 1024 |
|
|
| 1025 |
|
|
| 1026 |
|
protected final ClassFileLocator classFileLocator; |
| 1027 |
|
|
| 1028 |
|
|
| 1029 |
|
|
| 1030 |
|
|
| 1031 |
|
protected final ReaderMode readerMode; |
| 1032 |
|
|
| 1033 |
|
|
| 1034 |
|
|
| 1035 |
|
|
| 1036 |
|
@param |
| 1037 |
|
@param |
| 1038 |
|
@param |
| 1039 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1040 |
50094 |
public Default(CacheProvider cacheProvider, ClassFileLocator classFileLocator, ReaderMode readerMode) {... |
| 1041 |
50094 |
this(cacheProvider, classFileLocator, readerMode, Empty.INSTANCE); |
| 1042 |
|
} |
| 1043 |
|
|
| 1044 |
|
|
| 1045 |
|
|
| 1046 |
|
|
| 1047 |
|
@param |
| 1048 |
|
@param |
| 1049 |
|
@param |
| 1050 |
|
@param |
| 1051 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 1052 |
50103 |
public Default(CacheProvider cacheProvider, ClassFileLocator classFileLocator, ReaderMode readerMode, TypePool parentPool) {... |
| 1053 |
50103 |
super(cacheProvider, parentPool); |
| 1054 |
50103 |
this.classFileLocator = classFileLocator; |
| 1055 |
50103 |
this.readerMode = readerMode; |
| 1056 |
|
} |
| 1057 |
|
|
| 1058 |
|
|
| 1059 |
|
@link |
| 1060 |
|
|
| 1061 |
|
|
| 1062 |
|
@return |
| 1063 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1064 |
260 |
public static TypePool ofClassPath() {... |
| 1065 |
260 |
return of(ClassFileLocator.ForClassLoader.ofClassPath()); |
| 1066 |
|
} |
| 1067 |
|
|
| 1068 |
|
|
| 1069 |
|
|
| 1070 |
|
|
| 1071 |
|
@param |
| 1072 |
|
@return |
| 1073 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1074 |
0 |
public static TypePool of(ClassLoader classLoader) {... |
| 1075 |
0 |
return of(ClassFileLocator.ForClassLoader.of(classLoader)); |
| 1076 |
|
} |
| 1077 |
|
|
| 1078 |
|
|
| 1079 |
|
@link |
| 1080 |
|
|
| 1081 |
|
|
| 1082 |
|
@param |
| 1083 |
|
@return |
| 1084 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1085 |
825 |
public static TypePool of(ClassFileLocator classFileLocator) {... |
| 1086 |
825 |
return new Default(new CacheProvider.Simple(), classFileLocator, ReaderMode.FAST); |
| 1087 |
|
} |
| 1088 |
|
|
| |
|
| 83.3% |
Uncovered Elements: 1 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1089 |
4985 |
@Override... |
| 1090 |
|
protected Resolution doDescribe(String name) { |
| 1091 |
4985 |
try { |
| 1092 |
4985 |
ClassFileLocator.Resolution resolution = classFileLocator.locate(name); |
| 1093 |
4985 |
return resolution.isResolved() |
| 1094 |
|
? new Resolution.Simple(parse(resolution.resolve())) |
| 1095 |
|
: new Resolution.Illegal(name); |
| 1096 |
|
} catch (IOException exception) { |
| 1097 |
0 |
throw new IllegalStateException("Error while reading class file", exception); |
| 1098 |
|
} |
| 1099 |
|
} |
| 1100 |
|
|
| 1101 |
|
|
| 1102 |
|
|
| 1103 |
|
|
| 1104 |
|
@param |
| 1105 |
|
@return |
| 1106 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 1107 |
4977 |
private TypeDescription parse(byte[] binaryRepresentation) {... |
| 1108 |
4977 |
ClassReader classReader = new ClassReader(binaryRepresentation); |
| 1109 |
4977 |
TypeExtractor typeExtractor = new TypeExtractor(); |
| 1110 |
4977 |
classReader.accept(typeExtractor, readerMode.getFlags()); |
| 1111 |
4977 |
return typeExtractor.toTypeDescription(); |
| 1112 |
|
} |
| 1113 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1114 |
19 |
@Override... |
| 1115 |
|
public boolean equals(Object other) { |
| 1116 |
19 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 1117 |
|
&& super.equals(other) |
| 1118 |
|
&& classFileLocator.equals(((Default) other).classFileLocator) |
| 1119 |
|
&& readerMode.equals(((Default) other).readerMode); |
| 1120 |
|
} |
| 1121 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1122 |
11 |
@Override... |
| 1123 |
|
public int hashCode() { |
| 1124 |
11 |
return 31 * (31 * super.hashCode() + classFileLocator.hashCode()) + readerMode.hashCode(); |
| 1125 |
|
} |
| 1126 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1127 |
16 |
@Override... |
| 1128 |
|
public String toString() { |
| 1129 |
16 |
return "TypePool.Default{" + |
| 1130 |
|
"classFileLocator=" + classFileLocator + |
| 1131 |
|
", cacheProvider=" + cacheProvider + |
| 1132 |
|
", readerMode=" + readerMode + |
| 1133 |
|
'}'; |
| 1134 |
|
} |
| 1135 |
|
|
| 1136 |
|
|
| 1137 |
|
|
| 1138 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 1139 |
|
protected interface AnnotationRegistrant { |
| 1140 |
|
|
| 1141 |
|
|
| 1142 |
|
|
| 1143 |
|
|
| 1144 |
|
@param |
| 1145 |
|
@param |
| 1146 |
|
|
| 1147 |
|
void register(String name, AnnotationDescription.AnnotationValue<?, ?> annotationValue); |
| 1148 |
|
|
| 1149 |
|
|
| 1150 |
|
|
| 1151 |
|
|
| 1152 |
|
void onComplete(); |
| 1153 |
|
|
| 1154 |
|
|
| 1155 |
|
|
| 1156 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1157 |
|
abstract class AbstractBase implements AnnotationRegistrant { |
| 1158 |
|
|
| 1159 |
|
|
| 1160 |
|
|
| 1161 |
|
|
| 1162 |
|
private final String descriptor; |
| 1163 |
|
|
| 1164 |
|
|
| 1165 |
|
|
| 1166 |
|
|
| 1167 |
|
private final Map<String, AnnotationDescription.AnnotationValue<?, ?>> values; |
| 1168 |
|
|
| 1169 |
|
|
| 1170 |
|
|
| 1171 |
|
|
| 1172 |
|
@param |
| 1173 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1174 |
23014 |
protected AbstractBase(String descriptor) {... |
| 1175 |
23014 |
this.descriptor = descriptor; |
| 1176 |
23014 |
values = new HashMap<String, AnnotationDescription.AnnotationValue<?, ?>>(); |
| 1177 |
|
} |
| 1178 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1179 |
11782 |
@Override... |
| 1180 |
|
public void register(String name, AnnotationDescription.AnnotationValue<?, ?> annotationValue) { |
| 1181 |
11782 |
values.put(name, annotationValue); |
| 1182 |
|
} |
| 1183 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1184 |
23000 |
@Override... |
| 1185 |
|
public void onComplete() { |
| 1186 |
23000 |
getTokens().add(new LazyTypeDescription.AnnotationToken(descriptor, values)); |
| 1187 |
|
} |
| 1188 |
|
|
| 1189 |
|
|
| 1190 |
|
|
| 1191 |
|
|
| 1192 |
|
@return |
| 1193 |
|
|
| 1194 |
|
protected abstract List<LazyTypeDescription.AnnotationToken> getTokens(); |
| 1195 |
|
|
| 1196 |
|
|
| 1197 |
|
|
| 1198 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 1199 |
|
protected abstract static class ForTypeVariable extends AbstractBase { |
| 1200 |
|
|
| 1201 |
|
|
| 1202 |
|
|
| 1203 |
|
|
| 1204 |
|
private final String typePath; |
| 1205 |
|
|
| 1206 |
|
|
| 1207 |
|
|
| 1208 |
|
|
| 1209 |
|
@param |
| 1210 |
|
@param |
| 1211 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 1212 |
2098 |
protected ForTypeVariable(String descriptor, TypePath typePath) {... |
| 1213 |
2098 |
super(descriptor); |
| 1214 |
2098 |
this.typePath = typePath == null |
| 1215 |
|
? LazyTypeDescription.GenericTypeToken.EMPTY_TYPE_PATH |
| 1216 |
|
: typePath.toString(); |
| 1217 |
|
} |
| 1218 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 1219 |
2092 |
@Override... |
| 1220 |
|
protected List<LazyTypeDescription.AnnotationToken> getTokens() { |
| 1221 |
2092 |
Map<String, List<LazyTypeDescription.AnnotationToken>> pathMap = getPathMap(); |
| 1222 |
2092 |
List<LazyTypeDescription.AnnotationToken> tokens = pathMap.get(typePath); |
| 1223 |
2092 |
if (tokens == null) { |
| 1224 |
2078 |
tokens = new ArrayList<LazyTypeDescription.AnnotationToken>(); |
| 1225 |
2078 |
pathMap.put(typePath, tokens); |
| 1226 |
|
} |
| 1227 |
2092 |
return tokens; |
| 1228 |
|
} |
| 1229 |
|
|
| 1230 |
|
|
| 1231 |
|
|
| 1232 |
|
|
| 1233 |
|
@return |
| 1234 |
|
|
| 1235 |
|
protected abstract Map<String, List<LazyTypeDescription.AnnotationToken>> getPathMap(); |
| 1236 |
|
|
| 1237 |
|
|
| 1238 |
|
|
| 1239 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 3 |
Complexity Density: 0.38 |
|
| 1240 |
|
protected abstract static class WithIndex extends AbstractBase.ForTypeVariable { |
| 1241 |
|
|
| 1242 |
|
|
| 1243 |
|
|
| 1244 |
|
|
| 1245 |
|
private final int index; |
| 1246 |
|
|
| 1247 |
|
|
| 1248 |
|
|
| 1249 |
|
|
| 1250 |
|
@param |
| 1251 |
|
@param |
| 1252 |
|
@param |
| 1253 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1254 |
1324 |
protected WithIndex(String descriptor, TypePath typePath, int index) {... |
| 1255 |
1324 |
super(descriptor, typePath); |
| 1256 |
1324 |
this.index = index; |
| 1257 |
|
} |
| 1258 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 1259 |
1320 |
@Override... |
| 1260 |
|
protected Map<String, List<LazyTypeDescription.AnnotationToken>> getPathMap() { |
| 1261 |
1320 |
Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> indexedPathMap = getIndexedPathMap(); |
| 1262 |
1320 |
Map<String, List<LazyTypeDescription.AnnotationToken>> pathMap = indexedPathMap.get(index); |
| 1263 |
1320 |
if (pathMap == null) { |
| 1264 |
788 |
pathMap = new HashMap<String, List<LazyTypeDescription.AnnotationToken>>(); |
| 1265 |
788 |
indexedPathMap.put(index, pathMap); |
| 1266 |
|
} |
| 1267 |
1320 |
return pathMap; |
| 1268 |
|
} |
| 1269 |
|
|
| 1270 |
|
|
| 1271 |
|
|
| 1272 |
|
|
| 1273 |
|
@return |
| 1274 |
|
|
| 1275 |
|
protected abstract Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> getIndexedPathMap(); |
| 1276 |
|
|
| 1277 |
|
|
| 1278 |
|
|
| 1279 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 3 |
Complexity Density: 0.38 |
|
| 1280 |
|
protected abstract static class DoubleIndexed extends WithIndex { |
| 1281 |
|
|
| 1282 |
|
|
| 1283 |
|
|
| 1284 |
|
|
| 1285 |
|
private final int preIndex; |
| 1286 |
|
|
| 1287 |
|
|
| 1288 |
|
|
| 1289 |
|
|
| 1290 |
|
@param |
| 1291 |
|
@param |
| 1292 |
|
@param |
| 1293 |
|
@param |
| 1294 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1295 |
496 |
protected DoubleIndexed(String descriptor, TypePath typePath, int index, int preIndex) {... |
| 1296 |
496 |
super(descriptor, typePath, index); |
| 1297 |
496 |
this.preIndex = preIndex; |
| 1298 |
|
} |
| 1299 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 1300 |
494 |
@Override... |
| 1301 |
|
protected Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> getIndexedPathMap() { |
| 1302 |
494 |
Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> doubleIndexPathMap = getDoubleIndexedPathMap(); |
| 1303 |
494 |
Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> indexedPathMap = doubleIndexPathMap.get(preIndex); |
| 1304 |
494 |
if (indexedPathMap == null) { |
| 1305 |
190 |
indexedPathMap = new HashMap<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>(); |
| 1306 |
190 |
doubleIndexPathMap.put(preIndex, indexedPathMap); |
| 1307 |
|
} |
| 1308 |
494 |
return indexedPathMap; |
| 1309 |
|
} |
| 1310 |
|
|
| 1311 |
|
|
| 1312 |
|
|
| 1313 |
|
|
| 1314 |
|
@return |
| 1315 |
|
|
| 1316 |
|
protected abstract Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> getDoubleIndexedPathMap(); |
| 1317 |
|
} |
| 1318 |
|
} |
| 1319 |
|
} |
| 1320 |
|
} |
| 1321 |
|
|
| 1322 |
|
|
| 1323 |
|
|
| 1324 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1325 |
|
class ForByteCodeElement extends AbstractBase { |
| 1326 |
|
|
| 1327 |
|
|
| 1328 |
|
|
| 1329 |
|
|
| 1330 |
|
private final List<LazyTypeDescription.AnnotationToken> annotationTokens; |
| 1331 |
|
|
| 1332 |
|
|
| 1333 |
|
|
| 1334 |
|
|
| 1335 |
|
@param |
| 1336 |
|
@param |
| 1337 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1338 |
20502 |
protected ForByteCodeElement(String descriptor, List<LazyTypeDescription.AnnotationToken> annotationTokens) {... |
| 1339 |
20502 |
super(descriptor); |
| 1340 |
20502 |
this.annotationTokens = annotationTokens; |
| 1341 |
|
} |
| 1342 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1343 |
20498 |
@Override... |
| 1344 |
|
protected List<LazyTypeDescription.AnnotationToken> getTokens() { |
| 1345 |
20498 |
return annotationTokens; |
| 1346 |
|
} |
| 1347 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1348 |
10 |
@Override... |
| 1349 |
|
public String toString() { |
| 1350 |
10 |
return "TypePool.Default.AnnotationRegistrant.ForByteCodeElement{" + |
| 1351 |
|
"annotationTokens=" + annotationTokens + |
| 1352 |
|
'}'; |
| 1353 |
|
} |
| 1354 |
|
|
| 1355 |
|
|
| 1356 |
|
|
| 1357 |
|
|
| |
|
| 92.9% |
Uncovered Elements: 1 (14) |
Complexity: 4 |
Complexity Density: 0.44 |
|
| 1358 |
|
public static class WithIndex extends AbstractBase { |
| 1359 |
|
|
| 1360 |
|
|
| 1361 |
|
|
| 1362 |
|
|
| 1363 |
|
private final int index; |
| 1364 |
|
|
| 1365 |
|
|
| 1366 |
|
|
| 1367 |
|
|
| 1368 |
|
private final Map<Integer, List<LazyTypeDescription.AnnotationToken>> annotationTokens; |
| 1369 |
|
|
| 1370 |
|
|
| 1371 |
|
|
| 1372 |
|
|
| 1373 |
|
@param |
| 1374 |
|
@param |
| 1375 |
|
@param |
| 1376 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 1377 |
414 |
protected WithIndex(String descriptor, int index, Map<Integer, List<LazyTypeDescription.AnnotationToken>> annotationTokens) {... |
| 1378 |
414 |
super(descriptor); |
| 1379 |
414 |
this.index = index; |
| 1380 |
414 |
this.annotationTokens = annotationTokens; |
| 1381 |
|
} |
| 1382 |
|
|
| |
|
| 85.7% |
Uncovered Elements: 1 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
| 1383 |
410 |
@Override... |
| 1384 |
|
protected List<LazyTypeDescription.AnnotationToken> getTokens() { |
| 1385 |
410 |
List<LazyTypeDescription.AnnotationToken> annotationTokens = this.annotationTokens.get(index); |
| 1386 |
410 |
if (annotationTokens == null) { |
| 1387 |
410 |
annotationTokens = new ArrayList<LazyTypeDescription.AnnotationToken>(); |
| 1388 |
410 |
this.annotationTokens.put(index, annotationTokens); |
| 1389 |
|
} |
| 1390 |
410 |
return annotationTokens; |
| 1391 |
|
} |
| 1392 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1393 |
12 |
@Override... |
| 1394 |
|
public String toString() { |
| 1395 |
12 |
return "TypePool.Default.AnnotationRegistrant.ForByteCodeElement.WithIndex{" + |
| 1396 |
|
"index=" + index + |
| 1397 |
|
", annotationTokens=" + annotationTokens + |
| 1398 |
|
'}'; |
| 1399 |
|
} |
| 1400 |
|
} |
| 1401 |
|
} |
| 1402 |
|
|
| 1403 |
|
|
| 1404 |
|
|
| 1405 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1406 |
|
class ForTypeVariable extends AbstractBase.ForTypeVariable { |
| 1407 |
|
|
| 1408 |
|
|
| 1409 |
|
|
| 1410 |
|
|
| 1411 |
|
private final Map<String, List<LazyTypeDescription.AnnotationToken>> pathMap; |
| 1412 |
|
|
| 1413 |
|
|
| 1414 |
|
|
| 1415 |
|
|
| 1416 |
|
@param |
| 1417 |
|
@param |
| 1418 |
|
@param |
| 1419 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1420 |
774 |
protected ForTypeVariable(String descriptor, TypePath typePath, Map<String, List<LazyTypeDescription.AnnotationToken>> pathMap) {... |
| 1421 |
774 |
super(descriptor, typePath); |
| 1422 |
774 |
this.pathMap = pathMap; |
| 1423 |
|
} |
| 1424 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1425 |
772 |
@Override... |
| 1426 |
|
protected Map<String, List<LazyTypeDescription.AnnotationToken>> getPathMap() { |
| 1427 |
772 |
return pathMap; |
| 1428 |
|
} |
| 1429 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1430 |
5 |
@Override... |
| 1431 |
|
public String toString() { |
| 1432 |
5 |
return "TypePool.Default.AnnotationRegistrant.ForTypeVariable{" + |
| 1433 |
|
", pathMap=" + pathMap + |
| 1434 |
|
'}'; |
| 1435 |
|
} |
| 1436 |
|
|
| 1437 |
|
|
| 1438 |
|
|
| 1439 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1440 |
|
public static class WithIndex extends AbstractBase.ForTypeVariable.WithIndex { |
| 1441 |
|
|
| 1442 |
|
|
| 1443 |
|
|
| 1444 |
|
|
| 1445 |
|
private final Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> indexedPathMap; |
| 1446 |
|
|
| 1447 |
|
|
| 1448 |
|
|
| 1449 |
|
|
| 1450 |
|
@param |
| 1451 |
|
@param |
| 1452 |
|
@param |
| 1453 |
|
@param |
| 1454 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1455 |
828 |
protected WithIndex(String descriptor,... |
| 1456 |
|
TypePath typePath, |
| 1457 |
|
int index, |
| 1458 |
|
Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> indexedPathMap) { |
| 1459 |
828 |
super(descriptor, typePath, index); |
| 1460 |
828 |
this.indexedPathMap = indexedPathMap; |
| 1461 |
|
} |
| 1462 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1463 |
826 |
@Override... |
| 1464 |
|
protected Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> getIndexedPathMap() { |
| 1465 |
826 |
return indexedPathMap; |
| 1466 |
|
} |
| 1467 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1468 |
6 |
@Override... |
| 1469 |
|
public String toString() { |
| 1470 |
6 |
return "TypePool.Default.AnnotationRegistrant.ForTypeVariable.WithIndex{" + |
| 1471 |
|
", indexedPathMap=" + indexedPathMap + |
| 1472 |
|
'}'; |
| 1473 |
|
} |
| 1474 |
|
|
| 1475 |
|
|
| 1476 |
|
|
| 1477 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 1478 |
|
public static class DoubleIndexed extends AbstractBase.ForTypeVariable.WithIndex.DoubleIndexed { |
| 1479 |
|
|
| 1480 |
|
|
| 1481 |
|
|
| 1482 |
|
|
| 1483 |
|
private final Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> doubleIndexedPathMap; |
| 1484 |
|
|
| 1485 |
|
|
| 1486 |
|
|
| 1487 |
|
|
| 1488 |
|
@param |
| 1489 |
|
@param |
| 1490 |
|
@param |
| 1491 |
|
@param |
| 1492 |
|
@param |
| 1493 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1494 |
496 |
protected DoubleIndexed(String descriptor,... |
| 1495 |
|
TypePath typePath, |
| 1496 |
|
int index, |
| 1497 |
|
int preIndex, |
| 1498 |
|
Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> doubleIndexedPathMap) { |
| 1499 |
496 |
super(descriptor, typePath, index, preIndex); |
| 1500 |
496 |
this.doubleIndexedPathMap = doubleIndexedPathMap; |
| 1501 |
|
} |
| 1502 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1503 |
494 |
@Override... |
| 1504 |
|
protected Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> getDoubleIndexedPathMap() { |
| 1505 |
494 |
return doubleIndexedPathMap; |
| 1506 |
|
} |
| 1507 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1508 |
7 |
@Override... |
| 1509 |
|
public String toString() { |
| 1510 |
7 |
return "TypePool.Default.AnnotationRegistrant.ForTypeVariable.WithIndex.DoubleIndexed{" + |
| 1511 |
|
", doubleIndexedPathMap=" + doubleIndexedPathMap + |
| 1512 |
|
'}'; |
| 1513 |
|
} |
| 1514 |
|
} |
| 1515 |
|
} |
| 1516 |
|
} |
| 1517 |
|
} |
| 1518 |
|
|
| 1519 |
|
|
| 1520 |
|
|
| 1521 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 1522 |
|
protected interface ComponentTypeLocator { |
| 1523 |
|
|
| 1524 |
|
|
| 1525 |
|
|
| 1526 |
|
|
| 1527 |
|
@param |
| 1528 |
|
|
| 1529 |
|
@return |
| 1530 |
|
|
| 1531 |
|
RawNonPrimitiveArray.ComponentTypeReference bind(String name); |
| 1532 |
|
|
| 1533 |
|
|
| 1534 |
|
|
| 1535 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 1536 |
|
enum Illegal implements ComponentTypeLocator { |
| 1537 |
|
|
| 1538 |
|
|
| 1539 |
|
|
| 1540 |
|
|
| 1541 |
|
INSTANCE; |
| 1542 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1543 |
1 |
@Override... |
| 1544 |
|
public RawNonPrimitiveArray.ComponentTypeReference bind(String name) { |
| 1545 |
1 |
throw new IllegalStateException("Unexpected lookup of component type for " + name); |
| 1546 |
|
} |
| 1547 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1548 |
1 |
@Override... |
| 1549 |
|
public String toString() { |
| 1550 |
1 |
return "TypePool.Default.ComponentTypeLocator.Illegal." + name(); |
| 1551 |
|
} |
| 1552 |
|
} |
| 1553 |
|
|
| 1554 |
|
|
| 1555 |
|
|
| 1556 |
|
|
| 1557 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 1558 |
|
class ForAnnotationProperty implements ComponentTypeLocator { |
| 1559 |
|
|
| 1560 |
|
|
| 1561 |
|
|
| 1562 |
|
|
| 1563 |
|
private final TypePool typePool; |
| 1564 |
|
|
| 1565 |
|
|
| 1566 |
|
|
| 1567 |
|
|
| 1568 |
|
private final String annotationName; |
| 1569 |
|
|
| 1570 |
|
|
| 1571 |
|
|
| 1572 |
|
|
| 1573 |
|
@param |
| 1574 |
|
@param |
| 1575 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1576 |
23061 |
public ForAnnotationProperty(TypePool typePool, String annotationDescriptor) {... |
| 1577 |
23061 |
this.typePool = typePool; |
| 1578 |
23061 |
annotationName = annotationDescriptor.substring(1, annotationDescriptor.length() - 1).replace('/', '.'); |
| 1579 |
|
} |
| 1580 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1581 |
628 |
@Override... |
| 1582 |
|
public RawNonPrimitiveArray.ComponentTypeReference bind(String name) { |
| 1583 |
628 |
return new Bound(name); |
| 1584 |
|
} |
| 1585 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1586 |
6 |
@Override... |
| 1587 |
|
public boolean equals(Object other) { |
| 1588 |
6 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 1589 |
|
&& annotationName.equals(((ForAnnotationProperty) other).annotationName) |
| 1590 |
|
&& typePool.equals(((ForAnnotationProperty) other).typePool); |
| 1591 |
|
} |
| 1592 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 1593 |
4 |
@Override... |
| 1594 |
|
public int hashCode() { |
| 1595 |
4 |
int result = typePool.hashCode(); |
| 1596 |
4 |
result = 31 * result + annotationName.hashCode(); |
| 1597 |
4 |
return result; |
| 1598 |
|
} |
| 1599 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1600 |
4 |
@Override... |
| 1601 |
|
public String toString() { |
| 1602 |
4 |
return "TypePool.Default.ComponentTypeLocator.ForAnnotationProperty{" + |
| 1603 |
|
"typePool=" + typePool + |
| 1604 |
|
", annotationName='" + annotationName + '\'' + |
| 1605 |
|
'}'; |
| 1606 |
|
} |
| 1607 |
|
|
| 1608 |
|
|
| 1609 |
|
|
| 1610 |
|
@link |
| 1611 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
| 1612 |
|
protected class Bound implements RawNonPrimitiveArray.ComponentTypeReference { |
| 1613 |
|
|
| 1614 |
|
|
| 1615 |
|
|
| 1616 |
|
|
| 1617 |
|
private final String name; |
| 1618 |
|
|
| 1619 |
|
|
| 1620 |
|
|
| 1621 |
|
|
| 1622 |
|
@param |
| 1623 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1624 |
632 |
protected Bound(String name) {... |
| 1625 |
632 |
this.name = name; |
| 1626 |
|
} |
| 1627 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1628 |
449 |
@Override... |
| 1629 |
|
public String lookup() { |
| 1630 |
449 |
return typePool.describe(annotationName) |
| 1631 |
|
.resolve() |
| 1632 |
|
.getDeclaredMethods() |
| 1633 |
|
.filter(named(name)) |
| 1634 |
|
.getOnly() |
| 1635 |
|
.getReturnType() |
| 1636 |
|
.asErasure() |
| 1637 |
|
.getComponentType() |
| 1638 |
|
.getName(); |
| 1639 |
|
} |
| 1640 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1641 |
6 |
@Override... |
| 1642 |
|
public boolean equals(Object other) { |
| 1643 |
6 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 1644 |
|
&& name.equals(((Bound) other).name) |
| 1645 |
|
&& ForAnnotationProperty.this.equals(((Bound) other).getOuter()); |
| 1646 |
|
} |
| 1647 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1648 |
4 |
@Override... |
| 1649 |
|
public int hashCode() { |
| 1650 |
4 |
return name.hashCode() + 31 * ForAnnotationProperty.this.hashCode(); |
| 1651 |
|
} |
| 1652 |
|
|
| 1653 |
|
|
| 1654 |
|
|
| 1655 |
|
|
| 1656 |
|
@return |
| 1657 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1658 |
2 |
private ForAnnotationProperty getOuter() {... |
| 1659 |
2 |
return ForAnnotationProperty.this; |
| 1660 |
|
} |
| 1661 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1662 |
3 |
@Override... |
| 1663 |
|
public String toString() { |
| 1664 |
3 |
return "TypePool.Default.ComponentTypeLocator.ForAnnotationProperty.Bound{" + |
| 1665 |
|
"name='" + name + '\'' + |
| 1666 |
|
'}'; |
| 1667 |
|
} |
| 1668 |
|
} |
| 1669 |
|
} |
| 1670 |
|
|
| 1671 |
|
|
| 1672 |
|
|
| 1673 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 6 |
Complexity Density: 0.86 |
|
| 1674 |
|
class ForArrayType implements ComponentTypeLocator, RawNonPrimitiveArray.ComponentTypeReference { |
| 1675 |
|
|
| 1676 |
|
|
| 1677 |
|
|
| 1678 |
|
|
| 1679 |
|
private final String componentType; |
| 1680 |
|
|
| 1681 |
|
|
| 1682 |
|
|
| 1683 |
|
|
| 1684 |
|
@param |
| 1685 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1686 |
89 |
public ForArrayType(String methodDescriptor) {... |
| 1687 |
89 |
String arrayType = Type.getMethodType(methodDescriptor).getReturnType().getClassName(); |
| 1688 |
89 |
componentType = arrayType.substring(0, arrayType.length() - 2); |
| 1689 |
|
} |
| 1690 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1691 |
13 |
@Override... |
| 1692 |
|
public RawNonPrimitiveArray.ComponentTypeReference bind(String name) { |
| 1693 |
13 |
return this; |
| 1694 |
|
} |
| 1695 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1696 |
1 |
@Override... |
| 1697 |
|
public String lookup() { |
| 1698 |
1 |
return componentType; |
| 1699 |
|
} |
| 1700 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1701 |
5 |
@Override... |
| 1702 |
|
public boolean equals(Object other) { |
| 1703 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 1704 |
|
&& componentType.equals(((ForArrayType) other).componentType); |
| 1705 |
|
} |
| 1706 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1707 |
3 |
@Override... |
| 1708 |
|
public int hashCode() { |
| 1709 |
3 |
return componentType.hashCode(); |
| 1710 |
|
} |
| 1711 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1712 |
3 |
@Override... |
| 1713 |
|
public String toString() { |
| 1714 |
3 |
return "TypePool.Default.ComponentTypeLocator.ForArrayType{" + |
| 1715 |
|
"componentType='" + componentType + '\'' + |
| 1716 |
|
'}'; |
| 1717 |
|
} |
| 1718 |
|
} |
| 1719 |
|
} |
| 1720 |
|
|
| 1721 |
|
|
| 1722 |
|
|
| 1723 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 1724 |
|
protected interface GenericTypeRegistrant { |
| 1725 |
|
|
| 1726 |
|
|
| 1727 |
|
|
| 1728 |
|
|
| 1729 |
|
@param |
| 1730 |
|
|
| 1731 |
|
void register(LazyTypeDescription.GenericTypeToken token); |
| 1732 |
|
|
| 1733 |
|
|
| 1734 |
|
|
| 1735 |
|
|
| |
|
| 16.7% |
Uncovered Elements: 30 (36) |
Complexity: 18 |
Complexity Density: 1 |
|
| 1736 |
|
class RejectingSignatureVisitor extends SignatureVisitor { |
| 1737 |
|
|
| 1738 |
|
|
| 1739 |
|
|
| 1740 |
|
|
| 1741 |
|
private static final String MESSAGE = "Unexpected token in generic signature"; |
| 1742 |
|
|
| 1743 |
|
|
| 1744 |
|
|
| 1745 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1746 |
64098 |
public RejectingSignatureVisitor() {... |
| 1747 |
64098 |
super(Opcodes.ASM5); |
| 1748 |
|
} |
| 1749 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1750 |
0 |
@Override... |
| 1751 |
|
public void visitFormalTypeParameter(String name) { |
| 1752 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1753 |
|
} |
| 1754 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1755 |
0 |
@Override... |
| 1756 |
|
public SignatureVisitor visitClassBound() { |
| 1757 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1758 |
|
} |
| 1759 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1760 |
0 |
@Override... |
| 1761 |
|
public SignatureVisitor visitInterfaceBound() { |
| 1762 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1763 |
|
} |
| 1764 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1765 |
18 |
@Override... |
| 1766 |
|
public SignatureVisitor visitSuperclass() { |
| 1767 |
18 |
throw new IllegalStateException(MESSAGE); |
| 1768 |
|
} |
| 1769 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1770 |
0 |
@Override... |
| 1771 |
|
public SignatureVisitor visitInterface() { |
| 1772 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1773 |
|
} |
| 1774 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1775 |
0 |
@Override... |
| 1776 |
|
public SignatureVisitor visitParameterType() { |
| 1777 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1778 |
|
} |
| 1779 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1780 |
0 |
@Override... |
| 1781 |
|
public SignatureVisitor visitReturnType() { |
| 1782 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1783 |
|
} |
| 1784 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1785 |
0 |
@Override... |
| 1786 |
|
public SignatureVisitor visitExceptionType() { |
| 1787 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1788 |
|
} |
| 1789 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1790 |
0 |
@Override... |
| 1791 |
|
public void visitBaseType(char descriptor) { |
| 1792 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1793 |
|
} |
| 1794 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1795 |
0 |
@Override... |
| 1796 |
|
public void visitTypeVariable(String name) { |
| 1797 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1798 |
|
} |
| 1799 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1800 |
0 |
@Override... |
| 1801 |
|
public SignatureVisitor visitArrayType() { |
| 1802 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1803 |
|
} |
| 1804 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1805 |
0 |
@Override... |
| 1806 |
|
public void visitClassType(String name) { |
| 1807 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1808 |
|
} |
| 1809 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1810 |
0 |
@Override... |
| 1811 |
|
public void visitInnerClassType(String name) { |
| 1812 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1813 |
|
} |
| 1814 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1815 |
0 |
@Override... |
| 1816 |
|
public void visitTypeArgument() { |
| 1817 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1818 |
|
} |
| 1819 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1820 |
0 |
@Override... |
| 1821 |
|
public SignatureVisitor visitTypeArgument(char wildcard) { |
| 1822 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1823 |
|
} |
| 1824 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1825 |
0 |
@Override... |
| 1826 |
|
public void visitEnd() { |
| 1827 |
0 |
throw new IllegalStateException(MESSAGE); |
| 1828 |
|
} |
| 1829 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1830 |
2 |
@Override... |
| 1831 |
|
public String toString() { |
| 1832 |
2 |
return "TypePool.Default.GenericTypeRegistrant.RejectingSignatureVisitor{}"; |
| 1833 |
|
} |
| 1834 |
|
} |
| 1835 |
|
} |
| 1836 |
|
|
| 1837 |
|
|
| 1838 |
|
|
| 1839 |
|
|
| 1840 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (19) |
Complexity: 6 |
Complexity Density: 0.55 |
|
| 1841 |
|
protected static class ParameterBag { |
| 1842 |
|
|
| 1843 |
|
|
| 1844 |
|
|
| 1845 |
|
|
| 1846 |
|
private final Type[] parameterType; |
| 1847 |
|
|
| 1848 |
|
|
| 1849 |
|
|
| 1850 |
|
|
| 1851 |
|
private final Map<Integer, String> parameterRegistry; |
| 1852 |
|
|
| 1853 |
|
|
| 1854 |
|
|
| 1855 |
|
|
| 1856 |
|
@param |
| 1857 |
|
|
| 1858 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 1859 |
105213 |
protected ParameterBag(Type[] parameterType) {... |
| 1860 |
105213 |
this.parameterType = parameterType; |
| 1861 |
105213 |
parameterRegistry = new HashMap<Integer, String>(); |
| 1862 |
|
} |
| 1863 |
|
|
| 1864 |
|
|
| 1865 |
|
|
| 1866 |
|
|
| 1867 |
|
@param |
| 1868 |
|
@param |
| 1869 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1870 |
28702 |
protected void register(int offset, String name) {... |
| 1871 |
28702 |
parameterRegistry.put(offset, name); |
| 1872 |
|
} |
| 1873 |
|
|
| 1874 |
|
|
| 1875 |
|
|
| 1876 |
|
|
| 1877 |
|
@param |
| 1878 |
|
@return |
| 1879 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 3 |
Complexity Density: 0.43 |
|
| 1880 |
105131 |
protected List<LazyTypeDescription.MethodToken.ParameterToken> resolve(boolean isStatic) {... |
| 1881 |
105131 |
List<LazyTypeDescription.MethodToken.ParameterToken> parameterTokens = new ArrayList<LazyTypeDescription.MethodToken.ParameterToken>(parameterType.length); |
| 1882 |
105131 |
int offset = isStatic |
| 1883 |
|
? StackSize.ZERO.getSize() |
| 1884 |
|
: StackSize.SINGLE.getSize(); |
| 1885 |
105131 |
for (Type aParameterType : parameterType) { |
| 1886 |
102998 |
String name = this.parameterRegistry.get(offset); |
| 1887 |
102998 |
parameterTokens.add(name == null |
| 1888 |
|
? new LazyTypeDescription.MethodToken.ParameterToken() |
| 1889 |
|
: new LazyTypeDescription.MethodToken.ParameterToken(name)); |
| 1890 |
102998 |
offset += aParameterType.getSize(); |
| 1891 |
|
} |
| 1892 |
105131 |
return parameterTokens; |
| 1893 |
|
} |
| 1894 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1895 |
40 |
@Override... |
| 1896 |
|
public String toString() { |
| 1897 |
40 |
return "TypePool.Default.ParameterBag{" + |
| 1898 |
|
"parameterType=" + Arrays.toString(parameterType) + |
| 1899 |
|
", parameterRegistry=" + parameterRegistry + |
| 1900 |
|
'}'; |
| 1901 |
|
} |
| 1902 |
|
} |
| 1903 |
|
|
| 1904 |
|
|
| 1905 |
|
|
| 1906 |
|
|
| |
|
| 93.3% |
Uncovered Elements: 2 (30) |
Complexity: 14 |
Complexity Density: 0.74 |
|
| 1907 |
|
protected static class GenericTypeExtractor extends GenericTypeRegistrant.RejectingSignatureVisitor implements GenericTypeRegistrant { |
| 1908 |
|
|
| 1909 |
|
|
| 1910 |
|
|
| 1911 |
|
|
| 1912 |
|
private final GenericTypeRegistrant genericTypeRegistrant; |
| 1913 |
|
|
| 1914 |
|
|
| 1915 |
|
|
| 1916 |
|
|
| 1917 |
|
private IncompleteToken incompleteToken; |
| 1918 |
|
|
| 1919 |
|
|
| 1920 |
|
|
| 1921 |
|
|
| 1922 |
|
@param |
| 1923 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1924 |
49627 |
protected GenericTypeExtractor(GenericTypeRegistrant genericTypeRegistrant) {... |
| 1925 |
49627 |
this.genericTypeRegistrant = genericTypeRegistrant; |
| 1926 |
|
} |
| 1927 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1928 |
7213 |
@Override... |
| 1929 |
|
public void visitBaseType(char descriptor) { |
| 1930 |
7213 |
genericTypeRegistrant.register(LazyTypeDescription.GenericTypeToken.ForPrimitiveType.of(descriptor)); |
| 1931 |
|
} |
| 1932 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1933 |
13181 |
@Override... |
| 1934 |
|
public void visitTypeVariable(String name) { |
| 1935 |
13181 |
genericTypeRegistrant.register(new LazyTypeDescription.GenericTypeToken.ForTypeVariable(name)); |
| 1936 |
|
} |
| 1937 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1938 |
2858 |
@Override... |
| 1939 |
|
public SignatureVisitor visitArrayType() { |
| 1940 |
2858 |
return new GenericTypeExtractor(this); |
| 1941 |
|
} |
| 1942 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1943 |
2858 |
@Override... |
| 1944 |
|
public void register(LazyTypeDescription.GenericTypeToken componentTypeToken) { |
| 1945 |
2858 |
genericTypeRegistrant.register(new LazyTypeDescription.GenericTypeToken.ForGenericArray(componentTypeToken)); |
| 1946 |
|
} |
| 1947 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1948 |
26355 |
@Override... |
| 1949 |
|
public void visitClassType(String name) { |
| 1950 |
26355 |
incompleteToken = new IncompleteToken.ForTopLevelType(name); |
| 1951 |
|
} |
| 1952 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1953 |
450 |
@Override... |
| 1954 |
|
public void visitInnerClassType(String name) { |
| 1955 |
450 |
incompleteToken = new IncompleteToken.ForInnerClass(name, incompleteToken); |
| 1956 |
|
} |
| 1957 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1958 |
3896 |
@Override... |
| 1959 |
|
public void visitTypeArgument() { |
| 1960 |
3896 |
incompleteToken.appendPlaceholder(); |
| 1961 |
|
} |
| 1962 |
|
|
| |
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 4 |
Complexity Density: 0.44 |
|
| 1963 |
11432 |
@Override... |
| 1964 |
|
public SignatureVisitor visitTypeArgument(char wildcard) { |
| 1965 |
11432 |
switch (wildcard) { |
| 1966 |
1135 |
case SignatureVisitor.SUPER: |
| 1967 |
1135 |
return incompleteToken.appendLowerBound(); |
| 1968 |
1832 |
case SignatureVisitor.EXTENDS: |
| 1969 |
1832 |
return incompleteToken.appendUpperBound(); |
| 1970 |
8465 |
case SignatureVisitor.INSTANCEOF: |
| 1971 |
8465 |
return incompleteToken.appendDirectBound(); |
| 1972 |
0 |
default: |
| 1973 |
0 |
throw new IllegalArgumentException("Unknown wildcard: " + wildcard); |
| 1974 |
|
} |
| 1975 |
|
} |
| 1976 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1977 |
26355 |
@Override... |
| 1978 |
|
public void visitEnd() { |
| 1979 |
26355 |
genericTypeRegistrant.register(incompleteToken.toToken()); |
| 1980 |
|
} |
| 1981 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 1982 |
8 |
@Override... |
| 1983 |
|
public String toString() { |
| 1984 |
8 |
return "TypePool.Default.GenericTypeExtractor{" + |
| 1985 |
|
"genericTypeRegistrant=" + genericTypeRegistrant + |
| 1986 |
|
", incompleteToken=" + incompleteToken + |
| 1987 |
|
'}'; |
| 1988 |
|
} |
| 1989 |
|
|
| 1990 |
|
|
| 1991 |
|
@link |
| 1992 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 1993 |
|
protected interface IncompleteToken { |
| 1994 |
|
|
| 1995 |
|
|
| 1996 |
|
|
| 1997 |
|
|
| 1998 |
|
@return |
| 1999 |
|
|
| 2000 |
|
SignatureVisitor appendLowerBound(); |
| 2001 |
|
|
| 2002 |
|
|
| 2003 |
|
|
| 2004 |
|
|
| 2005 |
|
@return |
| 2006 |
|
|
| 2007 |
|
SignatureVisitor appendUpperBound(); |
| 2008 |
|
|
| 2009 |
|
|
| 2010 |
|
|
| 2011 |
|
|
| 2012 |
|
@return |
| 2013 |
|
|
| 2014 |
|
SignatureVisitor appendDirectBound(); |
| 2015 |
|
|
| 2016 |
|
|
| 2017 |
|
|
| 2018 |
|
|
| 2019 |
|
void appendPlaceholder(); |
| 2020 |
|
|
| 2021 |
|
|
| 2022 |
|
|
| 2023 |
|
|
| 2024 |
|
@return |
| 2025 |
|
|
| 2026 |
|
boolean isParameterized(); |
| 2027 |
|
|
| 2028 |
|
|
| 2029 |
|
|
| 2030 |
|
|
| 2031 |
|
@return |
| 2032 |
|
|
| 2033 |
|
String getName(); |
| 2034 |
|
|
| 2035 |
|
|
| 2036 |
|
|
| 2037 |
|
|
| 2038 |
|
@return |
| 2039 |
|
|
| 2040 |
|
LazyTypeDescription.GenericTypeToken toToken(); |
| 2041 |
|
|
| 2042 |
|
|
| 2043 |
|
|
| 2044 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 2045 |
|
abstract class AbstractBase implements IncompleteToken { |
| 2046 |
|
|
| 2047 |
|
|
| 2048 |
|
|
| 2049 |
|
|
| 2050 |
|
protected final List<LazyTypeDescription.GenericTypeToken> parameters; |
| 2051 |
|
|
| 2052 |
|
|
| 2053 |
|
|
| 2054 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2055 |
26812 |
public AbstractBase() {... |
| 2056 |
26812 |
parameters = new ArrayList<LazyTypeDescription.GenericTypeToken>(); |
| 2057 |
|
} |
| 2058 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2059 |
8465 |
@Override... |
| 2060 |
|
public SignatureVisitor appendDirectBound() { |
| 2061 |
8465 |
return new GenericTypeExtractor(new ForDirectBound()); |
| 2062 |
|
} |
| 2063 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2064 |
1832 |
@Override... |
| 2065 |
|
public SignatureVisitor appendUpperBound() { |
| 2066 |
1832 |
return new GenericTypeExtractor(new ForUpperBound()); |
| 2067 |
|
} |
| 2068 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2069 |
1135 |
@Override... |
| 2070 |
|
public SignatureVisitor appendLowerBound() { |
| 2071 |
1135 |
return new GenericTypeExtractor(new ForLowerBound()); |
| 2072 |
|
} |
| 2073 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2074 |
3896 |
@Override... |
| 2075 |
|
public void appendPlaceholder() { |
| 2076 |
3896 |
parameters.add(LazyTypeDescription.GenericTypeToken.ForUnboundWildcard.INSTANCE); |
| 2077 |
|
} |
| 2078 |
|
|
| 2079 |
|
|
| 2080 |
|
|
| 2081 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 2082 |
|
protected class ForDirectBound implements GenericTypeRegistrant { |
| 2083 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2084 |
8465 |
@Override... |
| 2085 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2086 |
8465 |
parameters.add(token); |
| 2087 |
|
} |
| 2088 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2089 |
2 |
@Override... |
| 2090 |
|
public String toString() { |
| 2091 |
2 |
return "TypePool.Default.GenericTypeExtractor.IncompleteToken.AbstractBase.ForDirectBound{outer=" + AbstractBase.this + '}'; |
| 2092 |
|
} |
| 2093 |
|
} |
| 2094 |
|
|
| 2095 |
|
|
| 2096 |
|
|
| 2097 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 2098 |
|
protected class ForUpperBound implements GenericTypeRegistrant { |
| 2099 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2100 |
1832 |
@Override... |
| 2101 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2102 |
1832 |
parameters.add(new LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard(token)); |
| 2103 |
|
} |
| 2104 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2105 |
2 |
@Override... |
| 2106 |
|
public String toString() { |
| 2107 |
2 |
return "TypePool.Default.GenericTypeExtractor.IncompleteToken.AbstractBase.ForUpperBound{outer=" + AbstractBase.this + '}'; |
| 2108 |
|
} |
| 2109 |
|
} |
| 2110 |
|
|
| 2111 |
|
|
| 2112 |
|
|
| 2113 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 2114 |
|
protected class ForLowerBound implements GenericTypeRegistrant { |
| 2115 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2116 |
1135 |
@Override... |
| 2117 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2118 |
1135 |
parameters.add(new LazyTypeDescription.GenericTypeToken.ForLowerBoundWildcard(token)); |
| 2119 |
|
} |
| 2120 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2121 |
2 |
@Override... |
| 2122 |
|
public String toString() { |
| 2123 |
2 |
return "TypePool.Default.GenericTypeExtractor.IncompleteToken.AbstractBase.ForLowerBound{outer=" + AbstractBase.this + '}'; |
| 2124 |
|
} |
| 2125 |
|
} |
| 2126 |
|
} |
| 2127 |
|
|
| 2128 |
|
|
| 2129 |
|
|
| 2130 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 8 |
Complexity Density: 1.14 |
|
| 2131 |
|
class ForTopLevelType extends AbstractBase { |
| 2132 |
|
|
| 2133 |
|
|
| 2134 |
|
|
| 2135 |
|
|
| 2136 |
|
private final String internalName; |
| 2137 |
|
|
| 2138 |
|
|
| 2139 |
|
|
| 2140 |
|
|
| 2141 |
|
@param |
| 2142 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2143 |
26358 |
public ForTopLevelType(String internalName) {... |
| 2144 |
26358 |
this.internalName = internalName; |
| 2145 |
|
} |
| 2146 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 2147 |
26355 |
@Override... |
| 2148 |
|
public LazyTypeDescription.GenericTypeToken toToken() { |
| 2149 |
26355 |
return isParameterized() |
| 2150 |
|
? new LazyTypeDescription.GenericTypeToken.ForParameterizedType(getName(), parameters) |
| 2151 |
|
: new LazyTypeDescription.GenericTypeToken.ForRawType(getName()); |
| 2152 |
|
} |
| 2153 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2154 |
26387 |
@Override... |
| 2155 |
|
public boolean isParameterized() { |
| 2156 |
26387 |
return !parameters.isEmpty(); |
| 2157 |
|
} |
| 2158 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2159 |
26805 |
@Override... |
| 2160 |
|
public String getName() { |
| 2161 |
26805 |
return internalName.replace('/', '.'); |
| 2162 |
|
} |
| 2163 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2164 |
5 |
@Override... |
| 2165 |
|
public boolean equals(Object other) { |
| 2166 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 2167 |
|
&& internalName.equals(((ForTopLevelType) other).internalName); |
| 2168 |
|
} |
| 2169 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2170 |
3 |
@Override... |
| 2171 |
|
public int hashCode() { |
| 2172 |
3 |
return internalName.hashCode(); |
| 2173 |
|
} |
| 2174 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2175 |
4 |
@Override... |
| 2176 |
|
public String toString() { |
| 2177 |
4 |
return "TypePool.Default.GenericTypeExtractor.IncompleteToken.ForTopLevelType{" + |
| 2178 |
|
"internalName='" + internalName + '\'' + |
| 2179 |
|
'}'; |
| 2180 |
|
} |
| 2181 |
|
} |
| 2182 |
|
|
| 2183 |
|
|
| 2184 |
|
|
| 2185 |
|
|
| |
|
| 94.1% |
Uncovered Elements: 1 (17) |
Complexity: 9 |
Complexity Density: 1.12 |
|
| 2186 |
|
class ForInnerClass extends AbstractBase { |
| 2187 |
|
|
| 2188 |
|
|
| 2189 |
|
|
| 2190 |
|
|
| 2191 |
|
private static final char INNER_CLASS_SEPARATOR = '$'; |
| 2192 |
|
|
| 2193 |
|
|
| 2194 |
|
|
| 2195 |
|
|
| 2196 |
|
private final String internalName; |
| 2197 |
|
|
| 2198 |
|
|
| 2199 |
|
|
| 2200 |
|
|
| 2201 |
|
private final IncompleteToken outerTypeToken; |
| 2202 |
|
|
| 2203 |
|
|
| 2204 |
|
|
| 2205 |
|
|
| 2206 |
|
@param |
| 2207 |
|
@param |
| 2208 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 2209 |
454 |
public ForInnerClass(String internalName, IncompleteToken outerTypeToken) {... |
| 2210 |
454 |
this.internalName = internalName; |
| 2211 |
454 |
this.outerTypeToken = outerTypeToken; |
| 2212 |
|
} |
| 2213 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 3 |
Complexity Density: 3 |
|
| 2214 |
450 |
@Override... |
| 2215 |
|
public LazyTypeDescription.GenericTypeToken toToken() { |
| 2216 |
450 |
return isParameterized() || outerTypeToken.isParameterized() |
| 2217 |
|
? new LazyTypeDescription.GenericTypeToken.ForParameterizedType.Nested(getName(), parameters, outerTypeToken.toToken()) |
| 2218 |
|
: new LazyTypeDescription.GenericTypeToken.ForRawType(getName()); |
| 2219 |
|
} |
| 2220 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2221 |
450 |
@Override... |
| 2222 |
|
public boolean isParameterized() { |
| 2223 |
450 |
return !parameters.isEmpty() || !outerTypeToken.isParameterized(); |
| 2224 |
|
} |
| 2225 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2226 |
450 |
@Override... |
| 2227 |
|
public String getName() { |
| 2228 |
450 |
return outerTypeToken.getName() + INNER_CLASS_SEPARATOR + internalName.replace('/', '.'); |
| 2229 |
|
} |
| 2230 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2231 |
6 |
@Override... |
| 2232 |
|
public boolean equals(Object other) { |
| 2233 |
6 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 2234 |
|
&& internalName.equals(((ForInnerClass) other).internalName) |
| 2235 |
|
&& outerTypeToken.equals(((ForInnerClass) other).outerTypeToken); |
| 2236 |
|
} |
| 2237 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2238 |
4 |
@Override... |
| 2239 |
|
public int hashCode() { |
| 2240 |
4 |
return internalName.hashCode() + 31 * outerTypeToken.hashCode(); |
| 2241 |
|
} |
| 2242 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2243 |
6 |
@Override... |
| 2244 |
|
public String toString() { |
| 2245 |
6 |
return "TypePool.Default.GenericTypeExtractor.IncompleteToken.ForInnerClass{" + |
| 2246 |
|
"internalName='" + internalName + '\'' + |
| 2247 |
|
"outerTypeToken=" + outerTypeToken + |
| 2248 |
|
'}'; |
| 2249 |
|
} |
| 2250 |
|
} |
| 2251 |
|
} |
| 2252 |
|
|
| 2253 |
|
|
| 2254 |
|
|
| 2255 |
|
|
| 2256 |
|
@param |
| 2257 |
|
|
| |
|
| 92% |
Uncovered Elements: 2 (25) |
Complexity: 9 |
Complexity Density: 0.64 |
|
| 2258 |
|
protected abstract static class ForSignature<T extends LazyTypeDescription.GenericTypeToken.Resolution> |
| 2259 |
|
extends RejectingSignatureVisitor |
| 2260 |
|
implements GenericTypeRegistrant { |
| 2261 |
|
|
| 2262 |
|
|
| 2263 |
|
|
| 2264 |
|
|
| 2265 |
|
protected final List<LazyTypeDescription.GenericTypeToken.OfFormalTypeVariable> typeVariableTokens; |
| 2266 |
|
|
| 2267 |
|
|
| 2268 |
|
|
| 2269 |
|
|
| 2270 |
|
protected String currentTypeParameter; |
| 2271 |
|
|
| 2272 |
|
|
| 2273 |
|
|
| 2274 |
|
|
| 2275 |
|
protected List<LazyTypeDescription.GenericTypeToken> currentBounds; |
| 2276 |
|
|
| 2277 |
|
|
| 2278 |
|
|
| 2279 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2280 |
14469 |
public ForSignature() {... |
| 2281 |
14469 |
typeVariableTokens = new ArrayList<LazyTypeDescription.GenericTypeToken.OfFormalTypeVariable>(); |
| 2282 |
|
} |
| 2283 |
|
|
| 2284 |
|
|
| 2285 |
|
|
| 2286 |
|
|
| 2287 |
|
@param |
| 2288 |
|
@param |
| 2289 |
|
@param |
| 2290 |
|
@return |
| 2291 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 2292 |
14465 |
protected static <S extends LazyTypeDescription.GenericTypeToken.Resolution> S extract(String genericSignature, ForSignature<S> visitor) {... |
| 2293 |
14465 |
SignatureReader signatureReader = new SignatureReader(genericSignature); |
| 2294 |
14465 |
signatureReader.accept(visitor); |
| 2295 |
14438 |
return visitor.resolve(); |
| 2296 |
|
} |
| 2297 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 2298 |
3169 |
@Override... |
| 2299 |
|
public void visitFormalTypeParameter(String name) { |
| 2300 |
3169 |
collectTypeParameter(); |
| 2301 |
3169 |
currentTypeParameter = name; |
| 2302 |
3169 |
currentBounds = new ArrayList<LazyTypeDescription.GenericTypeToken>(); |
| 2303 |
|
} |
| 2304 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2305 |
2851 |
@Override... |
| 2306 |
|
public SignatureVisitor visitClassBound() { |
| 2307 |
2851 |
return new GenericTypeExtractor(this); |
| 2308 |
|
} |
| 2309 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2310 |
408 |
@Override... |
| 2311 |
|
public SignatureVisitor visitInterfaceBound() { |
| 2312 |
408 |
return new GenericTypeExtractor(this); |
| 2313 |
|
} |
| 2314 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 2315 |
3259 |
@Override... |
| 2316 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2317 |
3259 |
if (currentBounds == null) { |
| 2318 |
0 |
throw new IllegalStateException("Did not expect " + token + " before finding formal parameter"); |
| 2319 |
|
} |
| 2320 |
3259 |
currentBounds.add(token); |
| 2321 |
|
} |
| 2322 |
|
|
| 2323 |
|
|
| 2324 |
|
|
| 2325 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 2326 |
17616 |
protected void collectTypeParameter() {... |
| 2327 |
17616 |
if (currentTypeParameter != null) { |
| 2328 |
3169 |
typeVariableTokens.add(new LazyTypeDescription.GenericTypeToken.ForTypeVariable.Formal(currentTypeParameter, currentBounds)); |
| 2329 |
|
} |
| 2330 |
|
} |
| 2331 |
|
|
| 2332 |
|
|
| 2333 |
|
|
| 2334 |
|
|
| 2335 |
|
@return |
| 2336 |
|
|
| 2337 |
|
public abstract T resolve(); |
| 2338 |
|
|
| 2339 |
|
|
| 2340 |
|
|
| 2341 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (17) |
Complexity: 8 |
Complexity Density: 0.89 |
|
| 2342 |
|
protected static class OfType extends ForSignature<LazyTypeDescription.GenericTypeToken.Resolution.ForType> { |
| 2343 |
|
|
| 2344 |
|
|
| 2345 |
|
|
| 2346 |
|
|
| 2347 |
|
private final List<LazyTypeDescription.GenericTypeToken> interfaceTypeTokens; |
| 2348 |
|
|
| 2349 |
|
|
| 2350 |
|
|
| 2351 |
|
|
| 2352 |
|
private LazyTypeDescription.GenericTypeToken superClassToken; |
| 2353 |
|
|
| 2354 |
|
|
| 2355 |
|
|
| 2356 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2357 |
1932 |
protected OfType() {... |
| 2358 |
1932 |
interfaceTypeTokens = new ArrayList<LazyTypeDescription.GenericTypeToken>(); |
| 2359 |
|
} |
| 2360 |
|
|
| 2361 |
|
|
| 2362 |
|
|
| 2363 |
|
|
| 2364 |
|
@param |
| 2365 |
|
@return |
| 2366 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 2367 |
4977 |
public static LazyTypeDescription.GenericTypeToken.Resolution.ForType extract(String genericSignature) {... |
| 2368 |
4977 |
try { |
| 2369 |
4977 |
return genericSignature == null |
| 2370 |
|
? LazyTypeDescription.GenericTypeToken.Resolution.Raw.INSTANCE |
| 2371 |
|
: ForSignature.extract(genericSignature, new OfType()); |
| 2372 |
|
} catch (RuntimeException ignored) { |
| 2373 |
9 |
return LazyTypeDescription.GenericTypeToken.Resolution.Malformed.INSTANCE; |
| 2374 |
|
} |
| 2375 |
|
} |
| 2376 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 2377 |
1930 |
@Override... |
| 2378 |
|
public SignatureVisitor visitSuperclass() { |
| 2379 |
1930 |
collectTypeParameter(); |
| 2380 |
1930 |
return new GenericTypeExtractor(new SuperClassRegistrant()); |
| 2381 |
|
} |
| 2382 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2383 |
2438 |
@Override... |
| 2384 |
|
public SignatureVisitor visitInterface() { |
| 2385 |
2438 |
return new GenericTypeExtractor(new InterfaceTypeRegistrant()); |
| 2386 |
|
} |
| 2387 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2388 |
1921 |
@Override... |
| 2389 |
|
public LazyTypeDescription.GenericTypeToken.Resolution.ForType resolve() { |
| 2390 |
1921 |
return new LazyTypeDescription.GenericTypeToken.Resolution.ForType.Tokenized(superClassToken, interfaceTypeTokens, typeVariableTokens); |
| 2391 |
|
} |
| 2392 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2393 |
10 |
@Override... |
| 2394 |
|
public String toString() { |
| 2395 |
10 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfType{" + |
| 2396 |
|
"currentTypeParameter='" + currentTypeParameter + '\'' + |
| 2397 |
|
", currentBounds=" + currentBounds + |
| 2398 |
|
", typeVariableTokens=" + typeVariableTokens + |
| 2399 |
|
", superClassToken=" + superClassToken + |
| 2400 |
|
", interfaceTypeTokens=" + interfaceTypeTokens + |
| 2401 |
|
'}'; |
| 2402 |
|
} |
| 2403 |
|
|
| 2404 |
|
|
| 2405 |
|
|
| 2406 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 2407 |
|
protected class SuperClassRegistrant implements GenericTypeRegistrant { |
| 2408 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2409 |
1921 |
@Override... |
| 2410 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2411 |
1921 |
superClassToken = token; |
| 2412 |
|
} |
| 2413 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2414 |
3 |
@Override... |
| 2415 |
|
public int hashCode() { |
| 2416 |
3 |
return OfType.this.hashCode(); |
| 2417 |
|
} |
| 2418 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2419 |
5 |
@Override... |
| 2420 |
|
public boolean equals(Object other) { |
| 2421 |
5 |
return other != null |
| 2422 |
|
&& getClass() == other.getClass() |
| 2423 |
|
&& OfType.this.equals(((SuperClassRegistrant) other).getOuter()); |
| 2424 |
|
} |
| 2425 |
|
|
| 2426 |
|
|
| 2427 |
|
|
| 2428 |
|
|
| 2429 |
|
@return |
| 2430 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2431 |
3 |
private OfType getOuter() {... |
| 2432 |
3 |
return OfType.this; |
| 2433 |
|
} |
| 2434 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2435 |
2 |
@Override... |
| 2436 |
|
public String toString() { |
| 2437 |
2 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfType.SuperClassRegistrant{outer=" + OfType.this + '}'; |
| 2438 |
|
} |
| 2439 |
|
} |
| 2440 |
|
|
| 2441 |
|
|
| 2442 |
|
|
| 2443 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 2444 |
|
protected class InterfaceTypeRegistrant implements GenericTypeRegistrant { |
| 2445 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2446 |
2438 |
@Override... |
| 2447 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2448 |
2438 |
interfaceTypeTokens.add(token); |
| 2449 |
|
} |
| 2450 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2451 |
3 |
@Override... |
| 2452 |
|
public int hashCode() { |
| 2453 |
3 |
return OfType.this.hashCode(); |
| 2454 |
|
} |
| 2455 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2456 |
5 |
@Override... |
| 2457 |
|
public boolean equals(Object other) { |
| 2458 |
5 |
return other != null |
| 2459 |
|
&& getClass() == other.getClass() |
| 2460 |
|
&& OfType.this.equals(((InterfaceTypeRegistrant) other).getOuter()); |
| 2461 |
|
} |
| 2462 |
|
|
| 2463 |
|
|
| 2464 |
|
|
| 2465 |
|
|
| 2466 |
|
@return |
| 2467 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2468 |
3 |
private OfType getOuter() {... |
| 2469 |
3 |
return OfType.this; |
| 2470 |
|
} |
| 2471 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2472 |
2 |
@Override... |
| 2473 |
|
public String toString() { |
| 2474 |
2 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfType.InterfaceTypeRegistrant{outer=" + OfType.this + '}'; |
| 2475 |
|
} |
| 2476 |
|
} |
| 2477 |
|
} |
| 2478 |
|
|
| 2479 |
|
|
| 2480 |
|
|
| 2481 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (20) |
Complexity: 9 |
Complexity Density: 0.82 |
|
| 2482 |
|
protected static class OfMethod extends ForSignature<LazyTypeDescription.GenericTypeToken.Resolution.ForMethod> { |
| 2483 |
|
|
| 2484 |
|
|
| 2485 |
|
|
| 2486 |
|
|
| 2487 |
|
private final List<LazyTypeDescription.GenericTypeToken> parameterTypeTokens; |
| 2488 |
|
|
| 2489 |
|
|
| 2490 |
|
|
| 2491 |
|
|
| 2492 |
|
private final List<LazyTypeDescription.GenericTypeToken> exceptionTypeTokens; |
| 2493 |
|
|
| 2494 |
|
|
| 2495 |
|
|
| 2496 |
|
|
| 2497 |
|
private LazyTypeDescription.GenericTypeToken returnTypeToken; |
| 2498 |
|
|
| 2499 |
|
|
| 2500 |
|
|
| 2501 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 2502 |
12537 |
public OfMethod() {... |
| 2503 |
12537 |
parameterTypeTokens = new ArrayList<LazyTypeDescription.GenericTypeToken>(); |
| 2504 |
12537 |
exceptionTypeTokens = new ArrayList<LazyTypeDescription.GenericTypeToken>(); |
| 2505 |
|
} |
| 2506 |
|
|
| 2507 |
|
|
| 2508 |
|
|
| 2509 |
|
|
| 2510 |
|
@param |
| 2511 |
|
@return |
| 2512 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
| 2513 |
105205 |
public static LazyTypeDescription.GenericTypeToken.Resolution.ForMethod extract(String genericSignature) {... |
| 2514 |
105205 |
try { |
| 2515 |
105205 |
return genericSignature == null |
| 2516 |
|
? LazyTypeDescription.GenericTypeToken.Resolution.Raw.INSTANCE |
| 2517 |
|
: ForSignature.extract(genericSignature, new OfMethod()); |
| 2518 |
|
} catch (RuntimeException ignored) { |
| 2519 |
18 |
return LazyTypeDescription.GenericTypeToken.Resolution.Malformed.INSTANCE; |
| 2520 |
|
} |
| 2521 |
|
} |
| 2522 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2523 |
12675 |
@Override... |
| 2524 |
|
public SignatureVisitor visitParameterType() { |
| 2525 |
12675 |
return new GenericTypeExtractor(new ParameterTypeRegistrant()); |
| 2526 |
|
} |
| 2527 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 2528 |
12517 |
@Override... |
| 2529 |
|
public SignatureVisitor visitReturnType() { |
| 2530 |
12517 |
collectTypeParameter(); |
| 2531 |
12517 |
return new GenericTypeExtractor(new ReturnTypeTypeRegistrant()); |
| 2532 |
|
} |
| 2533 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2534 |
388 |
@Override... |
| 2535 |
|
public SignatureVisitor visitExceptionType() { |
| 2536 |
388 |
return new GenericTypeExtractor(new ExceptionTypeRegistrant()); |
| 2537 |
|
} |
| 2538 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2539 |
12517 |
@Override... |
| 2540 |
|
public LazyTypeDescription.GenericTypeToken.Resolution.ForMethod resolve() { |
| 2541 |
12517 |
return new LazyTypeDescription.GenericTypeToken.Resolution.ForMethod.Tokenized(returnTypeToken, |
| 2542 |
|
parameterTypeTokens, |
| 2543 |
|
exceptionTypeTokens, |
| 2544 |
|
typeVariableTokens); |
| 2545 |
|
} |
| 2546 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2547 |
14 |
@Override... |
| 2548 |
|
public String toString() { |
| 2549 |
14 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfMethod{" + |
| 2550 |
|
"currentTypeParameter='" + currentTypeParameter + '\'' + |
| 2551 |
|
", currentBounds=" + currentBounds + |
| 2552 |
|
", typeVariableTokens=" + typeVariableTokens + |
| 2553 |
|
", returnTypeToken=" + returnTypeToken + |
| 2554 |
|
", parameterTypeTokens=" + parameterTypeTokens + |
| 2555 |
|
", exceptionTypeTokens=" + exceptionTypeTokens + |
| 2556 |
|
'}'; |
| 2557 |
|
} |
| 2558 |
|
|
| 2559 |
|
|
| 2560 |
|
|
| 2561 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 2562 |
|
protected class ParameterTypeRegistrant implements GenericTypeRegistrant { |
| 2563 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2564 |
12675 |
@Override... |
| 2565 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2566 |
12675 |
parameterTypeTokens.add(token); |
| 2567 |
|
} |
| 2568 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2569 |
3 |
@Override... |
| 2570 |
|
public int hashCode() { |
| 2571 |
3 |
return OfMethod.this.hashCode(); |
| 2572 |
|
} |
| 2573 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2574 |
5 |
@Override... |
| 2575 |
|
public boolean equals(Object other) { |
| 2576 |
5 |
return other != null |
| 2577 |
|
&& getClass() == other.getClass() |
| 2578 |
|
&& OfMethod.this.equals(((ParameterTypeRegistrant) other).getOuter()); |
| 2579 |
|
} |
| 2580 |
|
|
| 2581 |
|
|
| 2582 |
|
|
| 2583 |
|
|
| 2584 |
|
@return |
| 2585 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2586 |
3 |
private OfMethod getOuter() {... |
| 2587 |
3 |
return OfMethod.this; |
| 2588 |
|
} |
| 2589 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2590 |
2 |
@Override... |
| 2591 |
|
public String toString() { |
| 2592 |
2 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfMethod.ParameterTypeRegistrant{outer=" + OfMethod.this + '}'; |
| 2593 |
|
} |
| 2594 |
|
} |
| 2595 |
|
|
| 2596 |
|
|
| 2597 |
|
|
| 2598 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 2599 |
|
protected class ReturnTypeTypeRegistrant implements GenericTypeRegistrant { |
| 2600 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2601 |
12517 |
@Override... |
| 2602 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2603 |
12517 |
returnTypeToken = token; |
| 2604 |
|
} |
| 2605 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2606 |
3 |
@Override... |
| 2607 |
|
public int hashCode() { |
| 2608 |
3 |
return OfMethod.this.hashCode(); |
| 2609 |
|
} |
| 2610 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2611 |
5 |
@Override... |
| 2612 |
|
public boolean equals(Object other) { |
| 2613 |
5 |
return other != null |
| 2614 |
|
&& getClass() == other.getClass() |
| 2615 |
|
&& OfMethod.this.equals(((ReturnTypeTypeRegistrant) other).getOuter()); |
| 2616 |
|
} |
| 2617 |
|
|
| 2618 |
|
|
| 2619 |
|
|
| 2620 |
|
|
| 2621 |
|
@return |
| 2622 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2623 |
3 |
private OfMethod getOuter() {... |
| 2624 |
3 |
return OfMethod.this; |
| 2625 |
|
} |
| 2626 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2627 |
2 |
@Override... |
| 2628 |
|
public String toString() { |
| 2629 |
2 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfMethod.ReturnTypeTypeRegistrant{outer=" + OfMethod.this + '}'; |
| 2630 |
|
} |
| 2631 |
|
} |
| 2632 |
|
|
| 2633 |
|
|
| 2634 |
|
|
| 2635 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 2636 |
|
protected class ExceptionTypeRegistrant implements GenericTypeRegistrant { |
| 2637 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2638 |
388 |
@Override... |
| 2639 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2640 |
388 |
exceptionTypeTokens.add(token); |
| 2641 |
|
} |
| 2642 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2643 |
3 |
@Override... |
| 2644 |
|
public int hashCode() { |
| 2645 |
3 |
return OfMethod.this.hashCode(); |
| 2646 |
|
} |
| 2647 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2648 |
5 |
@Override... |
| 2649 |
|
public boolean equals(Object other) { |
| 2650 |
5 |
return other != null |
| 2651 |
|
&& getClass() == other.getClass() |
| 2652 |
|
&& OfMethod.this.equals(((ExceptionTypeRegistrant) other).getOuter()); |
| 2653 |
|
} |
| 2654 |
|
|
| 2655 |
|
|
| 2656 |
|
|
| 2657 |
|
|
| 2658 |
|
@return |
| 2659 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2660 |
3 |
private OfMethod getOuter() {... |
| 2661 |
3 |
return OfMethod.this; |
| 2662 |
|
} |
| 2663 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2664 |
2 |
@Override... |
| 2665 |
|
public String toString() { |
| 2666 |
2 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfMethod.ExceptionTypeRegistrant{outer=" + OfMethod.this + '}'; |
| 2667 |
|
} |
| 2668 |
|
} |
| 2669 |
|
} |
| 2670 |
|
|
| 2671 |
|
|
| 2672 |
|
|
| 2673 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (17) |
Complexity: 6 |
Complexity Density: 0.55 |
|
| 2674 |
|
protected static class OfField implements GenericTypeRegistrant { |
| 2675 |
|
|
| 2676 |
|
|
| 2677 |
|
|
| 2678 |
|
|
| 2679 |
|
private LazyTypeDescription.GenericTypeToken fieldTypeToken; |
| 2680 |
|
|
| 2681 |
|
|
| 2682 |
|
|
| 2683 |
|
|
| 2684 |
|
@param |
| 2685 |
|
@return |
| 2686 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.38 |
|
| 2687 |
8584 |
public static LazyTypeDescription.GenericTypeToken.Resolution.ForField extract(String genericSignature) {... |
| 2688 |
8584 |
if (genericSignature == null) { |
| 2689 |
6456 |
return LazyTypeDescription.GenericTypeToken.Resolution.Raw.INSTANCE; |
| 2690 |
|
} else { |
| 2691 |
2128 |
SignatureReader signatureReader = new SignatureReader(genericSignature); |
| 2692 |
2128 |
OfField visitor = new OfField(); |
| 2693 |
2128 |
try { |
| 2694 |
2128 |
signatureReader.acceptType(new GenericTypeExtractor(visitor)); |
| 2695 |
2119 |
return visitor.resolve(); |
| 2696 |
|
} catch (RuntimeException ignored) { |
| 2697 |
9 |
return LazyTypeDescription.GenericTypeToken.Resolution.Malformed.INSTANCE; |
| 2698 |
|
} |
| 2699 |
|
} |
| 2700 |
|
} |
| 2701 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2702 |
2119 |
@Override... |
| 2703 |
|
public void register(LazyTypeDescription.GenericTypeToken token) { |
| 2704 |
2119 |
fieldTypeToken = token; |
| 2705 |
|
} |
| 2706 |
|
|
| 2707 |
|
|
| 2708 |
|
|
| 2709 |
|
|
| 2710 |
|
@return |
| 2711 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2712 |
2119 |
protected LazyTypeDescription.GenericTypeToken.Resolution.ForField resolve() {... |
| 2713 |
2119 |
return new LazyTypeDescription.GenericTypeToken.Resolution.ForField.Tokenized(fieldTypeToken); |
| 2714 |
|
} |
| 2715 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2716 |
3 |
@Override... |
| 2717 |
|
public String toString() { |
| 2718 |
3 |
return "TypePool.Default.GenericTypeExtractor.ForSignature.OfField{" + |
| 2719 |
|
"fieldTypeToken=" + fieldTypeToken + |
| 2720 |
|
'}'; |
| 2721 |
|
} |
| 2722 |
|
} |
| 2723 |
|
} |
| 2724 |
|
} |
| 2725 |
|
|
| 2726 |
|
|
| 2727 |
|
@link |
| 2728 |
|
@link |
| 2729 |
|
|
| |
|
| 95.3% |
Uncovered Elements: 3 (64) |
Complexity: 23 |
Complexity Density: 0.62 |
|
| 2730 |
|
public static class LazyTypeDescription extends TypeDescription.AbstractBase.OfSimpleType { |
| 2731 |
|
|
| 2732 |
|
|
| 2733 |
|
|
| 2734 |
|
|
| 2735 |
|
private static final int SUPER_CLASS_INDEX = -1; |
| 2736 |
|
|
| 2737 |
|
|
| 2738 |
|
|
| 2739 |
|
|
| 2740 |
|
private static final String NO_SUPER_CLASS = null; |
| 2741 |
|
|
| 2742 |
|
|
| 2743 |
|
|
| 2744 |
|
|
| 2745 |
|
private final TypePool typePool; |
| 2746 |
|
|
| 2747 |
|
|
| 2748 |
|
|
| 2749 |
|
|
| 2750 |
|
private final int modifiers; |
| 2751 |
|
|
| 2752 |
|
|
| 2753 |
|
|
| 2754 |
|
|
| 2755 |
|
private final String name; |
| 2756 |
|
|
| 2757 |
|
|
| 2758 |
|
|
| 2759 |
|
|
| 2760 |
|
private final String superClassDescriptor; |
| 2761 |
|
|
| 2762 |
|
|
| 2763 |
|
|
| 2764 |
|
|
| 2765 |
|
private final GenericTypeToken.Resolution.ForType signatureResolution; |
| 2766 |
|
|
| 2767 |
|
|
| 2768 |
|
|
| 2769 |
|
|
| 2770 |
|
private final List<String> interfaceTypeDescriptors; |
| 2771 |
|
|
| 2772 |
|
|
| 2773 |
|
|
| 2774 |
|
|
| 2775 |
|
private final DeclarationContext declarationContext; |
| 2776 |
|
|
| 2777 |
|
|
| 2778 |
|
|
| 2779 |
|
|
| 2780 |
|
private final List<String> declaredTypes; |
| 2781 |
|
|
| 2782 |
|
|
| 2783 |
|
|
| 2784 |
|
|
| 2785 |
|
private final boolean anonymousType; |
| 2786 |
|
|
| 2787 |
|
|
| 2788 |
|
|
| 2789 |
|
|
| 2790 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> superTypeAnnotationTokens; |
| 2791 |
|
|
| 2792 |
|
|
| 2793 |
|
|
| 2794 |
|
|
| 2795 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> typeVariableAnnotationTokens; |
| 2796 |
|
|
| 2797 |
|
|
| 2798 |
|
|
| 2799 |
|
|
| 2800 |
|
private final Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> typeVariableBoundsAnnotationTokens; |
| 2801 |
|
|
| 2802 |
|
|
| 2803 |
|
|
| 2804 |
|
|
| 2805 |
|
private final List<AnnotationToken> annotationTokens; |
| 2806 |
|
|
| 2807 |
|
|
| 2808 |
|
|
| 2809 |
|
|
| 2810 |
|
private final List<FieldToken> fieldTokens; |
| 2811 |
|
|
| 2812 |
|
|
| 2813 |
|
|
| 2814 |
|
|
| 2815 |
|
private final List<MethodToken> methodTokens; |
| 2816 |
|
|
| 2817 |
|
|
| 2818 |
|
|
| 2819 |
|
|
| 2820 |
|
@param |
| 2821 |
|
@param |
| 2822 |
|
@param |
| 2823 |
|
@param |
| 2824 |
|
@param |
| 2825 |
|
@param |
| 2826 |
|
@param |
| 2827 |
|
@param |
| 2828 |
|
@param |
| 2829 |
|
@param |
| 2830 |
|
@param |
| 2831 |
|
@param |
| 2832 |
|
|
| 2833 |
|
@param |
| 2834 |
|
@param |
| 2835 |
|
@param |
| 2836 |
|
|
| |
|
| 91.3% |
Uncovered Elements: 2 (23) |
Complexity: 3 |
Complexity Density: 0.16 |
|
| 2837 |
4977 |
protected LazyTypeDescription(TypePool typePool,... |
| 2838 |
|
int modifiers, |
| 2839 |
|
String name, |
| 2840 |
|
String superClassInternalName, |
| 2841 |
|
String[] interfaceInternalName, |
| 2842 |
|
GenericTypeToken.Resolution.ForType signatureResolution, |
| 2843 |
|
DeclarationContext declarationContext, |
| 2844 |
|
List<String> declaredTypes, |
| 2845 |
|
boolean anonymousType, |
| 2846 |
|
Map<Integer, Map<String, List<AnnotationToken>>> superTypeAnnotationTokens, |
| 2847 |
|
Map<Integer, Map<String, List<AnnotationToken>>> typeVariableAnnotationTokens, |
| 2848 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> typeVariableBoundsAnnotationTokens, |
| 2849 |
|
List<AnnotationToken> annotationTokens, |
| 2850 |
|
List<FieldToken> fieldTokens, |
| 2851 |
|
List<MethodToken> methodTokens) { |
| 2852 |
4977 |
this.typePool = typePool; |
| 2853 |
4977 |
this.modifiers = modifiers & ~(Opcodes.ACC_SUPER | Opcodes.ACC_DEPRECATED); |
| 2854 |
4977 |
this.name = Type.getObjectType(name).getClassName(); |
| 2855 |
4977 |
this.superClassDescriptor = superClassInternalName == null |
| 2856 |
|
? NO_SUPER_CLASS |
| 2857 |
|
: Type.getObjectType(superClassInternalName).getDescriptor(); |
| 2858 |
4977 |
this.signatureResolution = signatureResolution; |
| 2859 |
4977 |
if (interfaceInternalName == null) { |
| 2860 |
0 |
interfaceTypeDescriptors = Collections.emptyList(); |
| 2861 |
|
} else { |
| 2862 |
4977 |
interfaceTypeDescriptors = new ArrayList<String>(interfaceInternalName.length); |
| 2863 |
4977 |
for (String internalName : interfaceInternalName) { |
| 2864 |
3550 |
interfaceTypeDescriptors.add(Type.getObjectType(internalName).getDescriptor()); |
| 2865 |
|
} |
| 2866 |
|
} |
| 2867 |
4977 |
this.declarationContext = declarationContext; |
| 2868 |
4977 |
this.declaredTypes = declaredTypes; |
| 2869 |
4977 |
this.anonymousType = anonymousType; |
| 2870 |
4977 |
this.superTypeAnnotationTokens = superTypeAnnotationTokens; |
| 2871 |
4977 |
this.typeVariableAnnotationTokens = typeVariableAnnotationTokens; |
| 2872 |
4977 |
this.typeVariableBoundsAnnotationTokens = typeVariableBoundsAnnotationTokens; |
| 2873 |
4977 |
this.annotationTokens = annotationTokens; |
| 2874 |
4977 |
this.fieldTokens = fieldTokens; |
| 2875 |
4977 |
this.methodTokens = methodTokens; |
| 2876 |
|
} |
| 2877 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 3 |
Complexity Density: 3 |
|
| 2878 |
976 |
@Override... |
| 2879 |
|
public Generic getSuperClass() { |
| 2880 |
976 |
return superClassDescriptor == null || isInterface() |
| 2881 |
|
? Generic.UNDEFINED |
| 2882 |
|
: signatureResolution.resolveSuperClass(superClassDescriptor, typePool, superTypeAnnotationTokens.get(SUPER_CLASS_INDEX), this); |
| 2883 |
|
} |
| 2884 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2885 |
759 |
@Override... |
| 2886 |
|
public TypeList.Generic getInterfaces() { |
| 2887 |
759 |
return signatureResolution.resolveInterfaceTypes(interfaceTypeDescriptors, typePool, superTypeAnnotationTokens, this); |
| 2888 |
|
} |
| 2889 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2890 |
149 |
@Override... |
| 2891 |
|
public MethodDescription getEnclosingMethod() { |
| 2892 |
149 |
return declarationContext.getEnclosingMethod(typePool); |
| 2893 |
|
} |
| 2894 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2895 |
630 |
@Override... |
| 2896 |
|
public TypeDescription getEnclosingType() { |
| 2897 |
630 |
return declarationContext.getEnclosingType(typePool); |
| 2898 |
|
} |
| 2899 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2900 |
87 |
@Override... |
| 2901 |
|
public TypeList getDeclaredTypes() { |
| 2902 |
87 |
return new LazyTypeList(typePool, declaredTypes); |
| 2903 |
|
} |
| 2904 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2905 |
103 |
@Override... |
| 2906 |
|
public boolean isAnonymousClass() { |
| 2907 |
103 |
return anonymousType; |
| 2908 |
|
} |
| 2909 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2910 |
101 |
@Override... |
| 2911 |
|
public boolean isLocalClass() { |
| 2912 |
101 |
return !anonymousType && declarationContext.isDeclaredInMethod(); |
| 2913 |
|
} |
| 2914 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2915 |
91 |
@Override... |
| 2916 |
|
public boolean isMemberClass() { |
| 2917 |
91 |
return declarationContext.isDeclaredInType(); |
| 2918 |
|
} |
| 2919 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2920 |
436 |
@Override... |
| 2921 |
|
public FieldList<FieldDescription.InDefinedShape> getDeclaredFields() { |
| 2922 |
436 |
return new FieldTokenList(); |
| 2923 |
|
} |
| 2924 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2925 |
1361 |
@Override... |
| 2926 |
|
public MethodList<MethodDescription.InDefinedShape> getDeclaredMethods() { |
| 2927 |
1361 |
return new MethodTokenList(); |
| 2928 |
|
} |
| 2929 |
|
|
| |
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 2930 |
81 |
@Override... |
| 2931 |
|
public PackageDescription getPackage() { |
| 2932 |
81 |
String name = getName(); |
| 2933 |
81 |
int index = name.lastIndexOf('.'); |
| 2934 |
81 |
return index == -1 |
| 2935 |
|
? PackageDescription.UNDEFINED |
| 2936 |
|
: new LazyPackageDescription(typePool, name.substring(0, index)); |
| 2937 |
|
} |
| 2938 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2939 |
14471 |
@Override... |
| 2940 |
|
public String getName() { |
| 2941 |
14471 |
return name; |
| 2942 |
|
} |
| 2943 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 2944 |
1209 |
@Override... |
| 2945 |
|
public TypeDescription getDeclaringType() { |
| 2946 |
1209 |
return declarationContext.isDeclaredInType() |
| 2947 |
|
? declarationContext.getEnclosingType(typePool) |
| 2948 |
|
: TypeDescription.UNDEFINED; |
| 2949 |
|
} |
| 2950 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2951 |
3174 |
@Override... |
| 2952 |
|
public int getModifiers() { |
| 2953 |
3174 |
return modifiers; |
| 2954 |
|
} |
| 2955 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2956 |
776 |
@Override... |
| 2957 |
|
public AnnotationList getDeclaredAnnotations() { |
| 2958 |
776 |
return LazyAnnotationDescription.asList(typePool, annotationTokens); |
| 2959 |
|
} |
| 2960 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2961 |
1475 |
@Override... |
| 2962 |
|
public TypeList.Generic getTypeVariables() { |
| 2963 |
1475 |
return signatureResolution.resolveTypeVariables(typePool, this, typeVariableAnnotationTokens, typeVariableBoundsAnnotationTokens); |
| 2964 |
|
} |
| 2965 |
|
|
| 2966 |
|
|
| 2967 |
|
|
| 2968 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 2969 |
|
protected class FieldTokenList extends FieldList.AbstractBase<FieldDescription.InDefinedShape> { |
| 2970 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2971 |
829 |
@Override... |
| 2972 |
|
public FieldDescription.InDefinedShape get(int index) { |
| 2973 |
829 |
return fieldTokens.get(index).toFieldDescription(LazyTypeDescription.this); |
| 2974 |
|
} |
| 2975 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2976 |
1991 |
@Override... |
| 2977 |
|
public int size() { |
| 2978 |
1991 |
return fieldTokens.size(); |
| 2979 |
|
} |
| 2980 |
|
} |
| 2981 |
|
|
| 2982 |
|
|
| 2983 |
|
|
| 2984 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 2985 |
|
protected class MethodTokenList extends MethodList.AbstractBase<MethodDescription.InDefinedShape> { |
| 2986 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2987 |
14863 |
@Override... |
| 2988 |
|
public MethodDescription.InDefinedShape get(int index) { |
| 2989 |
14863 |
return methodTokens.get(index).toMethodDescription(LazyTypeDescription.this); |
| 2990 |
|
} |
| 2991 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 2992 |
18545 |
@Override... |
| 2993 |
|
public int size() { |
| 2994 |
18545 |
return methodTokens.size(); |
| 2995 |
|
} |
| 2996 |
|
} |
| 2997 |
|
|
| 2998 |
|
|
| 2999 |
|
|
| 3000 |
|
|
| 3001 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 3002 |
|
protected interface DeclarationContext { |
| 3003 |
|
|
| 3004 |
|
|
| 3005 |
|
|
| 3006 |
|
|
| 3007 |
|
@param |
| 3008 |
|
@return |
| 3009 |
|
|
| 3010 |
|
MethodDescription getEnclosingMethod(TypePool typePool); |
| 3011 |
|
|
| 3012 |
|
|
| 3013 |
|
|
| 3014 |
|
|
| 3015 |
|
@param |
| 3016 |
|
@return |
| 3017 |
|
|
| 3018 |
|
TypeDescription getEnclosingType(TypePool typePool); |
| 3019 |
|
|
| 3020 |
|
|
| 3021 |
|
|
| 3022 |
|
|
| 3023 |
|
@return |
| 3024 |
|
|
| 3025 |
|
boolean isSelfDeclared(); |
| 3026 |
|
|
| 3027 |
|
|
| 3028 |
|
|
| 3029 |
|
|
| 3030 |
|
|
| 3031 |
|
@return |
| 3032 |
|
|
| 3033 |
|
|
| 3034 |
|
boolean isDeclaredInType(); |
| 3035 |
|
|
| 3036 |
|
|
| 3037 |
|
|
| 3038 |
|
|
| 3039 |
|
@return |
| 3040 |
|
|
| 3041 |
|
boolean isDeclaredInMethod(); |
| 3042 |
|
|
| 3043 |
|
|
| 3044 |
|
|
| 3045 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
| 3046 |
|
enum SelfDeclared implements DeclarationContext { |
| 3047 |
|
|
| 3048 |
|
|
| 3049 |
|
|
| 3050 |
|
|
| 3051 |
|
INSTANCE; |
| 3052 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3053 |
39 |
@Override... |
| 3054 |
|
public MethodDescription getEnclosingMethod(TypePool typePool) { |
| 3055 |
39 |
return MethodDescription.UNDEFINED; |
| 3056 |
|
} |
| 3057 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3058 |
319 |
@Override... |
| 3059 |
|
public TypeDescription getEnclosingType(TypePool typePool) { |
| 3060 |
319 |
return TypeDescription.UNDEFINED; |
| 3061 |
|
} |
| 3062 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3063 |
1887 |
@Override... |
| 3064 |
|
public boolean isSelfDeclared() { |
| 3065 |
1887 |
return true; |
| 3066 |
|
} |
| 3067 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3068 |
949 |
@Override... |
| 3069 |
|
public boolean isDeclaredInType() { |
| 3070 |
949 |
return false; |
| 3071 |
|
} |
| 3072 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3073 |
45 |
@Override... |
| 3074 |
|
public boolean isDeclaredInMethod() { |
| 3075 |
45 |
return false; |
| 3076 |
|
} |
| 3077 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3078 |
1 |
@Override... |
| 3079 |
|
public String toString() { |
| 3080 |
1 |
return "TypePool.Default.LazyTypeDescription.DeclarationContext.SelfDeclared." + name(); |
| 3081 |
|
} |
| 3082 |
|
} |
| 3083 |
|
|
| 3084 |
|
|
| 3085 |
|
|
| 3086 |
|
|
| 3087 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (18) |
Complexity: 9 |
Complexity Density: 1 |
|
| 3088 |
|
class DeclaredInType implements DeclarationContext { |
| 3089 |
|
|
| 3090 |
|
|
| 3091 |
|
|
| 3092 |
|
|
| 3093 |
|
private final String name; |
| 3094 |
|
|
| 3095 |
|
|
| 3096 |
|
|
| 3097 |
|
|
| 3098 |
|
@param |
| 3099 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3100 |
1894 |
public DeclaredInType(String internalName) {... |
| 3101 |
1894 |
name = internalName.replace('/', '.'); |
| 3102 |
|
} |
| 3103 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3104 |
72 |
@Override... |
| 3105 |
|
public MethodDescription getEnclosingMethod(TypePool typePool) { |
| 3106 |
72 |
return MethodDescription.UNDEFINED; |
| 3107 |
|
} |
| 3108 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3109 |
610 |
@Override... |
| 3110 |
|
public TypeDescription getEnclosingType(TypePool typePool) { |
| 3111 |
610 |
return typePool.describe(name).resolve(); |
| 3112 |
|
} |
| 3113 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3114 |
1 |
@Override... |
| 3115 |
|
public boolean isSelfDeclared() { |
| 3116 |
1 |
return false; |
| 3117 |
|
} |
| 3118 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3119 |
347 |
@Override... |
| 3120 |
|
public boolean isDeclaredInType() { |
| 3121 |
347 |
return true; |
| 3122 |
|
} |
| 3123 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3124 |
50 |
@Override... |
| 3125 |
|
public boolean isDeclaredInMethod() { |
| 3126 |
50 |
return false; |
| 3127 |
|
} |
| 3128 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3129 |
5 |
@Override... |
| 3130 |
|
public boolean equals(Object other) { |
| 3131 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 3132 |
|
&& name.equals(((DeclaredInType) other).name); |
| 3133 |
|
} |
| 3134 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3135 |
3 |
@Override... |
| 3136 |
|
public int hashCode() { |
| 3137 |
3 |
return name.hashCode(); |
| 3138 |
|
} |
| 3139 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3140 |
3 |
@Override... |
| 3141 |
|
public String toString() { |
| 3142 |
3 |
return "TypePool.Default.LazyTypeDescription.DeclarationContext.DeclaredInType{" + |
| 3143 |
|
"name='" + name + '\'' + |
| 3144 |
|
'}'; |
| 3145 |
|
} |
| 3146 |
|
} |
| 3147 |
|
|
| 3148 |
|
|
| 3149 |
|
|
| 3150 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (32) |
Complexity: 12 |
Complexity Density: 0.63 |
|
| 3151 |
|
class DeclaredInMethod implements DeclarationContext { |
| 3152 |
|
|
| 3153 |
|
|
| 3154 |
|
|
| 3155 |
|
|
| 3156 |
|
private final String name; |
| 3157 |
|
|
| 3158 |
|
|
| 3159 |
|
|
| 3160 |
|
|
| 3161 |
|
private final String methodName; |
| 3162 |
|
|
| 3163 |
|
|
| 3164 |
|
|
| 3165 |
|
|
| 3166 |
|
private final String methodDescriptor; |
| 3167 |
|
|
| 3168 |
|
|
| 3169 |
|
|
| 3170 |
|
|
| 3171 |
|
@param |
| 3172 |
|
@param |
| 3173 |
|
@param |
| 3174 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 3175 |
71 |
public DeclaredInMethod(String internalName, String methodName, String methodDescriptor) {... |
| 3176 |
71 |
name = internalName.replace('/', '.'); |
| 3177 |
71 |
this.methodName = methodName; |
| 3178 |
71 |
this.methodDescriptor = methodDescriptor; |
| 3179 |
|
} |
| 3180 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3181 |
41 |
@Override... |
| 3182 |
|
public MethodDescription getEnclosingMethod(TypePool typePool) { |
| 3183 |
41 |
return getEnclosingType(typePool).getDeclaredMethods().filter(hasMethodName(methodName).and(hasDescriptor(methodDescriptor))).getOnly(); |
| 3184 |
|
} |
| 3185 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3186 |
44 |
@Override... |
| 3187 |
|
public TypeDescription getEnclosingType(TypePool typePool) { |
| 3188 |
44 |
return typePool.describe(name).resolve(); |
| 3189 |
|
} |
| 3190 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3191 |
1 |
@Override... |
| 3192 |
|
public boolean isSelfDeclared() { |
| 3193 |
1 |
return false; |
| 3194 |
|
} |
| 3195 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3196 |
7 |
@Override... |
| 3197 |
|
public boolean isDeclaredInType() { |
| 3198 |
7 |
return false; |
| 3199 |
|
} |
| 3200 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3201 |
7 |
@Override... |
| 3202 |
|
public boolean isDeclaredInMethod() { |
| 3203 |
7 |
return true; |
| 3204 |
|
} |
| 3205 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 3206 |
7 |
@Override... |
| 3207 |
|
public boolean equals(Object other) { |
| 3208 |
1 |
if (this == other) return true; |
| 3209 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 3210 |
4 |
DeclaredInMethod that = (DeclaredInMethod) other; |
| 3211 |
4 |
return methodDescriptor.equals(that.methodDescriptor) |
| 3212 |
|
&& methodName.equals(that.methodName) |
| 3213 |
|
&& name.equals(that.name); |
| 3214 |
|
} |
| 3215 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 3216 |
5 |
@Override... |
| 3217 |
|
public int hashCode() { |
| 3218 |
5 |
int result = name.hashCode(); |
| 3219 |
5 |
result = 31 * result + methodName.hashCode(); |
| 3220 |
5 |
result = 31 * result + methodDescriptor.hashCode(); |
| 3221 |
5 |
return result; |
| 3222 |
|
} |
| 3223 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3224 |
5 |
@Override... |
| 3225 |
|
public String toString() { |
| 3226 |
5 |
return "TypePool.Default.LazyTypeDescription.DeclarationContext.DeclaredInMethod{" + |
| 3227 |
|
"name='" + name + '\'' + |
| 3228 |
|
", methodName='" + methodName + '\'' + |
| 3229 |
|
", methodDescriptor='" + methodDescriptor + '\'' + |
| 3230 |
|
'}'; |
| 3231 |
|
} |
| 3232 |
|
} |
| 3233 |
|
} |
| 3234 |
|
|
| 3235 |
|
|
| 3236 |
|
|
| 3237 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 3238 |
|
protected interface GenericTypeToken { |
| 3239 |
|
|
| 3240 |
|
|
| 3241 |
|
|
| 3242 |
|
|
| 3243 |
|
String EMPTY_TYPE_PATH = ""; |
| 3244 |
|
|
| 3245 |
|
|
| 3246 |
|
|
| 3247 |
|
|
| 3248 |
|
char COMPONENT_TYPE_PATH = '['; |
| 3249 |
|
|
| 3250 |
|
|
| 3251 |
|
|
| 3252 |
|
|
| 3253 |
|
char WILDCARD_TYPE_PATH = '*'; |
| 3254 |
|
|
| 3255 |
|
|
| 3256 |
|
|
| 3257 |
|
|
| 3258 |
|
char INNER_CLASS_PATH = '.'; |
| 3259 |
|
|
| 3260 |
|
|
| 3261 |
|
|
| 3262 |
|
|
| 3263 |
|
char INDEXED_TYPE_DELIMITER = ';'; |
| 3264 |
|
|
| 3265 |
|
|
| 3266 |
|
|
| 3267 |
|
|
| 3268 |
|
@param |
| 3269 |
|
@param |
| 3270 |
|
@param |
| 3271 |
|
@param |
| 3272 |
|
@return |
| 3273 |
|
|
| 3274 |
|
Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<AnnotationToken>> annotationTokens); |
| 3275 |
|
|
| 3276 |
|
|
| 3277 |
|
|
| 3278 |
|
@link |
| 3279 |
|
@link@link |
| 3280 |
|
|
| 3281 |
|
@param |
| 3282 |
|
@return |
| 3283 |
|
|
| 3284 |
|
boolean isPrimaryBound(TypePool typePool); |
| 3285 |
|
|
| 3286 |
|
|
| 3287 |
|
|
| 3288 |
|
|
| 3289 |
|
|
| 3290 |
|
@return |
| 3291 |
|
|
| 3292 |
|
String getTypePathPrefix(); |
| 3293 |
|
|
| 3294 |
|
|
| 3295 |
|
|
| 3296 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 3297 |
|
interface OfFormalTypeVariable { |
| 3298 |
|
|
| 3299 |
|
|
| 3300 |
|
|
| 3301 |
|
|
| 3302 |
|
@param |
| 3303 |
|
@param |
| 3304 |
|
@param |
| 3305 |
|
@param |
| 3306 |
|
@return |
| 3307 |
|
|
| 3308 |
|
Generic toGenericType(TypePool typePool, |
| 3309 |
|
TypeVariableSource typeVariableSource, |
| 3310 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3311 |
|
Map<Integer, Map<String, List<AnnotationToken>>> boundaryAnnotationTokens); |
| 3312 |
|
} |
| 3313 |
|
|
| 3314 |
|
|
| 3315 |
|
|
| 3316 |
|
|
| |
|
| 55.9% |
Uncovered Elements: 15 (34) |
Complexity: 16 |
Complexity Density: 0.62 |
|
| 3317 |
|
enum ForPrimitiveType implements GenericTypeToken { |
| 3318 |
|
|
| 3319 |
|
|
| 3320 |
|
|
| 3321 |
|
|
| 3322 |
|
BOOLEAN(boolean.class), |
| 3323 |
|
|
| 3324 |
|
|
| 3325 |
|
|
| 3326 |
|
|
| 3327 |
|
BYTE(byte.class), |
| 3328 |
|
|
| 3329 |
|
|
| 3330 |
|
|
| 3331 |
|
|
| 3332 |
|
SHORT(short.class), |
| 3333 |
|
|
| 3334 |
|
|
| 3335 |
|
|
| 3336 |
|
|
| 3337 |
|
CHAR(char.class), |
| 3338 |
|
|
| 3339 |
|
|
| 3340 |
|
|
| 3341 |
|
|
| 3342 |
|
INTEGER(int.class), |
| 3343 |
|
|
| 3344 |
|
|
| 3345 |
|
|
| 3346 |
|
|
| 3347 |
|
LONG(long.class), |
| 3348 |
|
|
| 3349 |
|
|
| 3350 |
|
|
| 3351 |
|
|
| 3352 |
|
FLOAT(float.class), |
| 3353 |
|
|
| 3354 |
|
|
| 3355 |
|
|
| 3356 |
|
|
| 3357 |
|
DOUBLE(double.class), |
| 3358 |
|
|
| 3359 |
|
|
| 3360 |
|
|
| 3361 |
|
|
| 3362 |
|
VOID(void.class); |
| 3363 |
|
|
| 3364 |
|
|
| 3365 |
|
|
| 3366 |
|
|
| 3367 |
|
private final TypeDescription typeDescription; |
| 3368 |
|
|
| 3369 |
|
|
| 3370 |
|
|
| 3371 |
|
|
| 3372 |
|
@param |
| 3373 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3374 |
9 |
ForPrimitiveType(Class<?> type) {... |
| 3375 |
9 |
typeDescription = new ForLoadedType(type); |
| 3376 |
|
} |
| 3377 |
|
|
| 3378 |
|
|
| 3379 |
|
|
| 3380 |
|
|
| 3381 |
|
@param |
| 3382 |
|
@return |
| 3383 |
|
|
| |
|
| 33.3% |
Uncovered Elements: 14 (21) |
Complexity: 10 |
Complexity Density: 0.48 |
|
| 3384 |
7213 |
public static GenericTypeToken of(char descriptor) {... |
| 3385 |
7213 |
switch (descriptor) { |
| 3386 |
1666 |
case 'V': |
| 3387 |
1666 |
return VOID; |
| 3388 |
2615 |
case 'Z': |
| 3389 |
2615 |
return BOOLEAN; |
| 3390 |
0 |
case 'B': |
| 3391 |
0 |
return BYTE; |
| 3392 |
0 |
case 'S': |
| 3393 |
0 |
return SHORT; |
| 3394 |
0 |
case 'C': |
| 3395 |
0 |
return CHAR; |
| 3396 |
2932 |
case 'I': |
| 3397 |
2932 |
return INTEGER; |
| 3398 |
0 |
case 'J': |
| 3399 |
0 |
return LONG; |
| 3400 |
0 |
case 'F': |
| 3401 |
0 |
return FLOAT; |
| 3402 |
0 |
case 'D': |
| 3403 |
0 |
return DOUBLE; |
| 3404 |
0 |
default: |
| 3405 |
0 |
throw new IllegalArgumentException("Not a valid primitive type descriptor: " + descriptor); |
| 3406 |
|
} |
| 3407 |
|
} |
| 3408 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 3409 |
20 |
@Override... |
| 3410 |
|
public Generic toGenericType(TypePool typePool, |
| 3411 |
|
TypeVariableSource typeVariableSource, |
| 3412 |
|
String typePath, |
| 3413 |
|
Map<String, List<AnnotationToken>> annotationTokens) { |
| 3414 |
20 |
return new LazyPrimitiveType(typePool, |
| 3415 |
|
typePath, |
| 3416 |
20 |
annotationTokens == null |
| 3417 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 3418 |
|
: annotationTokens, |
| 3419 |
|
typeDescription); |
| 3420 |
|
} |
| 3421 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3422 |
1 |
@Override... |
| 3423 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 3424 |
1 |
throw new IllegalStateException("A primitive type cannot be a type variable bound: " + this); |
| 3425 |
|
} |
| 3426 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3427 |
1 |
@Override... |
| 3428 |
|
public String getTypePathPrefix() { |
| 3429 |
1 |
throw new IllegalStateException("A primitive type cannot be the owner of a nested type: " + this); |
| 3430 |
|
} |
| 3431 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3432 |
11 |
@Override... |
| 3433 |
|
public String toString() { |
| 3434 |
11 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForPrimitiveType." + name(); |
| 3435 |
|
} |
| 3436 |
|
|
| 3437 |
|
|
| 3438 |
|
|
| 3439 |
|
|
| |
|
| 53.8% |
Uncovered Elements: 6 (13) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 3440 |
|
protected static class LazyPrimitiveType extends Generic.OfNonGenericType { |
| 3441 |
|
|
| 3442 |
|
|
| 3443 |
|
|
| 3444 |
|
|
| 3445 |
|
private final TypePool typePool; |
| 3446 |
|
|
| 3447 |
|
|
| 3448 |
|
|
| 3449 |
|
|
| 3450 |
|
private final String typePath; |
| 3451 |
|
|
| 3452 |
|
|
| 3453 |
|
|
| 3454 |
|
|
| 3455 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 3456 |
|
|
| 3457 |
|
|
| 3458 |
|
|
| 3459 |
|
|
| 3460 |
|
private final TypeDescription typeDescription; |
| 3461 |
|
|
| 3462 |
|
|
| 3463 |
|
|
| 3464 |
|
|
| 3465 |
|
@param |
| 3466 |
|
@param |
| 3467 |
|
@param |
| 3468 |
|
@param |
| 3469 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 3470 |
20 |
protected LazyPrimitiveType(TypePool typePool,... |
| 3471 |
|
String typePath, |
| 3472 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3473 |
|
TypeDescription typeDescription) { |
| 3474 |
20 |
this.typePool = typePool; |
| 3475 |
20 |
this.typePath = typePath; |
| 3476 |
20 |
this.annotationTokens = annotationTokens; |
| 3477 |
20 |
this.typeDescription = typeDescription; |
| 3478 |
|
} |
| 3479 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3480 |
0 |
@Override... |
| 3481 |
|
public TypeDescription asErasure() { |
| 3482 |
0 |
return typeDescription; |
| 3483 |
|
} |
| 3484 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3485 |
0 |
@Override... |
| 3486 |
|
public Generic getOwnerType() { |
| 3487 |
0 |
return UNDEFINED; |
| 3488 |
|
} |
| 3489 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3490 |
0 |
@Override... |
| 3491 |
|
public Generic getComponentType() { |
| 3492 |
0 |
return UNDEFINED; |
| 3493 |
|
} |
| 3494 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3495 |
12 |
@Override... |
| 3496 |
|
public AnnotationList getDeclaredAnnotations() { |
| 3497 |
12 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath)); |
| 3498 |
|
} |
| 3499 |
|
} |
| 3500 |
|
} |
| 3501 |
|
|
| 3502 |
|
|
| 3503 |
|
|
| 3504 |
|
|
| |
|
| 90% |
Uncovered Elements: 1 (10) |
Complexity: 5 |
Complexity Density: 1.25 |
|
| 3505 |
|
enum ForUnboundWildcard implements GenericTypeToken { |
| 3506 |
|
|
| 3507 |
|
|
| 3508 |
|
|
| 3509 |
|
|
| 3510 |
|
INSTANCE; |
| 3511 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 3512 |
94 |
@Override... |
| 3513 |
|
public Generic toGenericType(TypePool typePool, |
| 3514 |
|
TypeVariableSource typeVariableSource, |
| 3515 |
|
String typePath, |
| 3516 |
|
Map<String, List<AnnotationToken>> annotationTokens) { |
| 3517 |
94 |
return new LazyUnboundWildcard(typePool, |
| 3518 |
|
typePath, |
| 3519 |
94 |
annotationTokens == null |
| 3520 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 3521 |
|
: annotationTokens); |
| 3522 |
|
} |
| 3523 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3524 |
1 |
@Override... |
| 3525 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 3526 |
1 |
throw new IllegalStateException("A wildcard type cannot be a type variable bound: " + this); |
| 3527 |
|
} |
| 3528 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3529 |
1 |
@Override... |
| 3530 |
|
public String getTypePathPrefix() { |
| 3531 |
1 |
throw new IllegalStateException("An unbound wildcard cannot be the owner of a nested type: " + this); |
| 3532 |
|
} |
| 3533 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3534 |
3 |
@Override... |
| 3535 |
|
public String toString() { |
| 3536 |
3 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUnboundWildcard." + name(); |
| 3537 |
|
} |
| 3538 |
|
|
| 3539 |
|
|
| 3540 |
|
|
| 3541 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 3542 |
|
protected static class LazyUnboundWildcard extends Generic.OfWildcardType { |
| 3543 |
|
|
| 3544 |
|
|
| 3545 |
|
|
| 3546 |
|
|
| 3547 |
|
private final TypePool typePool; |
| 3548 |
|
|
| 3549 |
|
|
| 3550 |
|
|
| 3551 |
|
|
| 3552 |
|
private final String typePath; |
| 3553 |
|
|
| 3554 |
|
|
| 3555 |
|
|
| 3556 |
|
|
| 3557 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 3558 |
|
|
| 3559 |
|
|
| 3560 |
|
|
| 3561 |
|
|
| 3562 |
|
@param |
| 3563 |
|
@param |
| 3564 |
|
@param |
| 3565 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 3566 |
94 |
protected LazyUnboundWildcard(TypePool typePool, String typePath, Map<String, List<AnnotationToken>> annotationTokens) {... |
| 3567 |
94 |
this.typePool = typePool; |
| 3568 |
94 |
this.typePath = typePath; |
| 3569 |
94 |
this.annotationTokens = annotationTokens; |
| 3570 |
|
} |
| 3571 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3572 |
76 |
@Override... |
| 3573 |
|
public TypeList.Generic getUpperBounds() { |
| 3574 |
76 |
return new TypeList.Generic.Explicit(Generic.OBJECT); |
| 3575 |
|
} |
| 3576 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3577 |
72 |
@Override... |
| 3578 |
|
public TypeList.Generic getLowerBounds() { |
| 3579 |
72 |
return new TypeList.Generic.Empty(); |
| 3580 |
|
} |
| 3581 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3582 |
42 |
@Override... |
| 3583 |
|
public AnnotationList getDeclaredAnnotations() { |
| 3584 |
42 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath)); |
| 3585 |
|
} |
| 3586 |
|
} |
| 3587 |
|
} |
| 3588 |
|
|
| 3589 |
|
|
| 3590 |
|
|
| 3591 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 3592 |
|
interface Resolution { |
| 3593 |
|
|
| 3594 |
|
|
| 3595 |
|
|
| 3596 |
|
|
| 3597 |
|
@param |
| 3598 |
|
@param |
| 3599 |
|
@param |
| 3600 |
|
@param |
| 3601 |
|
|
| 3602 |
|
@return |
| 3603 |
|
|
| 3604 |
|
TypeList.Generic resolveTypeVariables(TypePool typePool, |
| 3605 |
|
TypeVariableSource typeVariableSource, |
| 3606 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3607 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens); |
| 3608 |
|
|
| 3609 |
|
|
| 3610 |
|
|
| 3611 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 8 |
Complexity Density: 1 |
|
| 3612 |
|
enum Raw implements ForType, ForMethod, ForField { |
| 3613 |
|
|
| 3614 |
|
|
| 3615 |
|
|
| 3616 |
|
|
| 3617 |
|
INSTANCE; |
| 3618 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3619 |
69 |
@Override... |
| 3620 |
|
public Generic resolveFieldType(String fieldTypeDescriptor, |
| 3621 |
|
TypePool typePool, |
| 3622 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3623 |
|
FieldDescription.InDefinedShape definingField) { |
| 3624 |
69 |
return RawAnnotatedType.of(typePool, annotationTokens, fieldTypeDescriptor); |
| 3625 |
|
} |
| 3626 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3627 |
1801 |
@Override... |
| 3628 |
|
public Generic resolveReturnType(String returnTypeDescriptor, |
| 3629 |
|
TypePool typePool, |
| 3630 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3631 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 3632 |
1801 |
return RawAnnotatedType.of(typePool, annotationTokens, returnTypeDescriptor); |
| 3633 |
|
} |
| 3634 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3635 |
1037 |
@Override... |
| 3636 |
|
public TypeList.Generic resolveParameterTypes(List<String> parameterTypeDescriptors, |
| 3637 |
|
TypePool typePool, |
| 3638 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3639 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 3640 |
1037 |
return RawAnnotatedType.LazyRawAnnotatedTypeList.of(typePool, annotationTokens, parameterTypeDescriptors); |
| 3641 |
|
} |
| 3642 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3643 |
437 |
@Override... |
| 3644 |
|
public TypeList.Generic resolveExceptionTypes(List<String> exceptionTypeDescriptors, |
| 3645 |
|
TypePool typePool, |
| 3646 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3647 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 3648 |
437 |
return RawAnnotatedType.LazyRawAnnotatedTypeList.of(typePool, annotationTokens, exceptionTypeDescriptors); |
| 3649 |
|
} |
| 3650 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3651 |
239 |
@Override... |
| 3652 |
|
public Generic resolveSuperClass(String superClassDescriptor, |
| 3653 |
|
TypePool typePool, |
| 3654 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3655 |
|
TypeDescription definingType) { |
| 3656 |
239 |
return RawAnnotatedType.of(typePool, annotationTokens, superClassDescriptor); |
| 3657 |
|
} |
| 3658 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3659 |
511 |
@Override... |
| 3660 |
|
public TypeList.Generic resolveInterfaceTypes(List<String> interfaceTypeDescriptors, |
| 3661 |
|
TypePool typePool, |
| 3662 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3663 |
|
TypeDescription definingType) { |
| 3664 |
511 |
return RawAnnotatedType.LazyRawAnnotatedTypeList.of(typePool, annotationTokens, interfaceTypeDescriptors); |
| 3665 |
|
} |
| 3666 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3667 |
914 |
@Override... |
| 3668 |
|
public TypeList.Generic resolveTypeVariables(TypePool typePool, |
| 3669 |
|
TypeVariableSource typeVariableSource, |
| 3670 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3671 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens) { |
| 3672 |
914 |
return new TypeList.Generic.Empty(); |
| 3673 |
|
} |
| 3674 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3675 |
1 |
@Override... |
| 3676 |
|
public String toString() { |
| 3677 |
1 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.Raw." + name(); |
| 3678 |
|
} |
| 3679 |
|
|
| 3680 |
|
|
| 3681 |
|
|
| 3682 |
|
|
| |
|
| 96.4% |
Uncovered Elements: 1 (28) |
Complexity: 10 |
Complexity Density: 0.71 |
|
| 3683 |
|
protected static class RawAnnotatedType extends Generic.OfNonGenericType { |
| 3684 |
|
|
| 3685 |
|
|
| 3686 |
|
|
| 3687 |
|
|
| 3688 |
|
private final TypePool typePool; |
| 3689 |
|
|
| 3690 |
|
|
| 3691 |
|
|
| 3692 |
|
|
| 3693 |
|
private final String typePath; |
| 3694 |
|
|
| 3695 |
|
|
| 3696 |
|
|
| 3697 |
|
|
| 3698 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 3699 |
|
|
| 3700 |
|
|
| 3701 |
|
|
| 3702 |
|
|
| 3703 |
|
private final TypeDescription typeDescription; |
| 3704 |
|
|
| 3705 |
|
|
| 3706 |
|
|
| 3707 |
|
|
| 3708 |
|
@param |
| 3709 |
|
@param |
| 3710 |
|
@param |
| 3711 |
|
@param |
| 3712 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 3713 |
3120 |
protected RawAnnotatedType(TypePool typePool,... |
| 3714 |
|
String typePath, |
| 3715 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3716 |
|
TypeDescription typeDescription) { |
| 3717 |
3120 |
this.typePool = typePool; |
| 3718 |
3120 |
this.typePath = typePath; |
| 3719 |
3120 |
this.annotationTokens = annotationTokens; |
| 3720 |
3120 |
this.typeDescription = typeDescription; |
| 3721 |
|
} |
| 3722 |
|
|
| 3723 |
|
|
| 3724 |
|
|
| 3725 |
|
|
| 3726 |
|
@param |
| 3727 |
|
@param |
| 3728 |
|
@param |
| 3729 |
|
@return |
| 3730 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 3731 |
2429 |
protected static Generic of(TypePool typePool, Map<String, List<AnnotationToken>> annotationTokens, String descriptor) {... |
| 3732 |
2429 |
return new RawAnnotatedType(typePool, |
| 3733 |
|
EMPTY_TYPE_PATH, |
| 3734 |
2429 |
annotationTokens == null |
| 3735 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 3736 |
|
: annotationTokens, |
| 3737 |
|
TokenizedGenericType.toErasure(typePool, descriptor)); |
| 3738 |
|
} |
| 3739 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3740 |
26430 |
@Override... |
| 3741 |
|
public TypeDescription asErasure() { |
| 3742 |
26430 |
return typeDescription; |
| 3743 |
|
} |
| 3744 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 3745 |
12 |
@Override... |
| 3746 |
|
public Generic getOwnerType() { |
| 3747 |
12 |
TypeDescription declaringType = typeDescription.getDeclaringType(); |
| 3748 |
12 |
return declaringType == null |
| 3749 |
|
? UNDEFINED |
| 3750 |
|
: new RawAnnotatedType(typePool, typePath, annotationTokens, declaringType); |
| 3751 |
|
} |
| 3752 |
|
|
| |
|
| 75% |
Uncovered Elements: 1 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 3753 |
48 |
@Override... |
| 3754 |
|
public Generic getComponentType() { |
| 3755 |
48 |
TypeDescription componentType = typeDescription.getComponentType(); |
| 3756 |
48 |
return componentType == null |
| 3757 |
|
? UNDEFINED |
| 3758 |
|
: new RawAnnotatedType(typePool, typePath + COMPONENT_TYPE_PATH, annotationTokens, componentType); |
| 3759 |
|
} |
| 3760 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 3761 |
576 |
@Override... |
| 3762 |
|
public AnnotationList getDeclaredAnnotations() { |
| 3763 |
576 |
StringBuilder typePath = new StringBuilder(this.typePath); |
| 3764 |
582 |
for (int index = 0; index < typeDescription.getSegmentCount(); index++) { |
| 3765 |
6 |
typePath = typePath.append(INNER_CLASS_PATH); |
| 3766 |
|
} |
| 3767 |
576 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath.toString())); |
| 3768 |
|
} |
| 3769 |
|
|
| 3770 |
|
|
| 3771 |
|
|
| 3772 |
|
|
| |
|
| 61.9% |
Uncovered Elements: 8 (21) |
Complexity: 8 |
Complexity Density: 0.67 |
|
| 3773 |
|
protected static class LazyRawAnnotatedTypeList extends TypeList.Generic.AbstractBase { |
| 3774 |
|
|
| 3775 |
|
|
| 3776 |
|
|
| 3777 |
|
|
| 3778 |
|
private final TypePool typePool; |
| 3779 |
|
|
| 3780 |
|
|
| 3781 |
|
|
| 3782 |
|
|
| 3783 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens; |
| 3784 |
|
|
| 3785 |
|
|
| 3786 |
|
|
| 3787 |
|
|
| 3788 |
|
private final List<String> descriptors; |
| 3789 |
|
|
| 3790 |
|
|
| 3791 |
|
|
| 3792 |
|
|
| 3793 |
|
@param |
| 3794 |
|
@param |
| 3795 |
|
@param |
| 3796 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 3797 |
1985 |
protected LazyRawAnnotatedTypeList(TypePool typePool,... |
| 3798 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3799 |
|
List<String> descriptors) { |
| 3800 |
1985 |
this.typePool = typePool; |
| 3801 |
1985 |
this.annotationTokens = annotationTokens; |
| 3802 |
1985 |
this.descriptors = descriptors; |
| 3803 |
|
} |
| 3804 |
|
|
| 3805 |
|
|
| 3806 |
|
|
| 3807 |
|
|
| 3808 |
|
@param |
| 3809 |
|
@param |
| 3810 |
|
|
| 3811 |
|
@param |
| 3812 |
|
@return |
| 3813 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 3814 |
1985 |
protected static TypeList.Generic of(TypePool typePool,... |
| 3815 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3816 |
|
List<String> descriptors) { |
| 3817 |
1985 |
return new LazyRawAnnotatedTypeList(typePool, |
| 3818 |
1985 |
annotationTokens == null |
| 3819 |
|
? Collections.<Integer, Map<String, List<AnnotationToken>>>emptyMap() |
| 3820 |
|
: annotationTokens, |
| 3821 |
|
descriptors); |
| 3822 |
|
} |
| 3823 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3824 |
320 |
@Override... |
| 3825 |
|
public Generic get(int index) { |
| 3826 |
320 |
return RawAnnotatedType.of(typePool, annotationTokens.get(index), descriptors.get(index)); |
| 3827 |
|
} |
| 3828 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3829 |
1275 |
@Override... |
| 3830 |
|
public int size() { |
| 3831 |
1275 |
return descriptors.size(); |
| 3832 |
|
} |
| 3833 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3834 |
1155 |
@Override... |
| 3835 |
|
public TypeList asErasures() { |
| 3836 |
1155 |
return new LazyTypeList(typePool, descriptors); |
| 3837 |
|
} |
| 3838 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3839 |
0 |
@Override... |
| 3840 |
|
public TypeList.Generic asRawTypes() { |
| 3841 |
0 |
return this; |
| 3842 |
|
} |
| 3843 |
|
|
| |
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 3844 |
0 |
@Override... |
| 3845 |
|
public int getStackSize() { |
| 3846 |
0 |
int stackSize = 0; |
| 3847 |
0 |
for (String descriptor : descriptors) { |
| 3848 |
0 |
stackSize += Type.getType(descriptor).getSize(); |
| 3849 |
|
} |
| 3850 |
0 |
return stackSize; |
| 3851 |
|
} |
| 3852 |
|
} |
| 3853 |
|
} |
| 3854 |
|
} |
| 3855 |
|
|
| 3856 |
|
|
| 3857 |
|
|
| 3858 |
|
|
| |
|
| 50% |
Uncovered Elements: 8 (16) |
Complexity: 8 |
Complexity Density: 1 |
|
| 3859 |
|
enum Malformed implements ForType, ForMethod, ForField { |
| 3860 |
|
|
| 3861 |
|
|
| 3862 |
|
|
| 3863 |
|
|
| 3864 |
|
INSTANCE; |
| 3865 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3866 |
2 |
@Override... |
| 3867 |
|
public Generic resolveFieldType(String fieldTypeDescriptor, |
| 3868 |
|
TypePool typePool, |
| 3869 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3870 |
|
FieldDescription.InDefinedShape definingField) { |
| 3871 |
2 |
return new TokenizedGenericType.Malformed(typePool, fieldTypeDescriptor); |
| 3872 |
|
} |
| 3873 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3874 |
2 |
@Override... |
| 3875 |
|
public Generic resolveReturnType(String returnTypeDescriptor, |
| 3876 |
|
TypePool typePool, |
| 3877 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3878 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 3879 |
2 |
return new TokenizedGenericType.Malformed(typePool, returnTypeDescriptor); |
| 3880 |
|
} |
| 3881 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3882 |
0 |
@Override... |
| 3883 |
|
public TypeList.Generic resolveParameterTypes(List<String> parameterTypeDescriptors, |
| 3884 |
|
TypePool typePool, |
| 3885 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3886 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 3887 |
0 |
return new TokenizedGenericType.Malformed.TokenList(typePool, parameterTypeDescriptors); |
| 3888 |
|
} |
| 3889 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3890 |
0 |
@Override... |
| 3891 |
|
public TypeList.Generic resolveExceptionTypes(List<String> exceptionTypeDescriptors, |
| 3892 |
|
TypePool typePool, |
| 3893 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3894 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 3895 |
0 |
return new TokenizedGenericType.Malformed.TokenList(typePool, exceptionTypeDescriptors); |
| 3896 |
|
} |
| 3897 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3898 |
0 |
@Override... |
| 3899 |
|
public Generic resolveSuperClass(String superClassDescriptor, |
| 3900 |
|
TypePool typePool, |
| 3901 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3902 |
|
TypeDescription definingType) { |
| 3903 |
0 |
return new TokenizedGenericType.Malformed(typePool, superClassDescriptor); |
| 3904 |
|
} |
| 3905 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3906 |
4 |
@Override... |
| 3907 |
|
public TypeList.Generic resolveInterfaceTypes(List<String> interfaceTypeDescriptors, |
| 3908 |
|
TypePool typePool, |
| 3909 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3910 |
|
TypeDescription definingType) { |
| 3911 |
4 |
return new TokenizedGenericType.Malformed.TokenList(typePool, interfaceTypeDescriptors); |
| 3912 |
|
} |
| 3913 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3914 |
0 |
@Override... |
| 3915 |
|
public TypeList.Generic resolveTypeVariables(TypePool typePool, |
| 3916 |
|
TypeVariableSource typeVariableSource, |
| 3917 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3918 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens) { |
| 3919 |
0 |
throw new GenericSignatureFormatError(); |
| 3920 |
|
} |
| 3921 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3922 |
1 |
@Override... |
| 3923 |
|
public String toString() { |
| 3924 |
1 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.Malformed." + name(); |
| 3925 |
|
} |
| 3926 |
|
} |
| 3927 |
|
|
| 3928 |
|
|
| 3929 |
|
@link |
| 3930 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 3931 |
|
interface ForType extends Resolution { |
| 3932 |
|
|
| 3933 |
|
|
| 3934 |
|
|
| 3935 |
|
|
| 3936 |
|
@param |
| 3937 |
|
@param |
| 3938 |
|
@param |
| 3939 |
|
@param |
| 3940 |
|
@return |
| 3941 |
|
|
| 3942 |
|
Generic resolveSuperClass(String superClassDescriptor, |
| 3943 |
|
TypePool typePool, |
| 3944 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 3945 |
|
TypeDescription definingType); |
| 3946 |
|
|
| 3947 |
|
|
| 3948 |
|
|
| 3949 |
|
|
| 3950 |
|
@param |
| 3951 |
|
@param |
| 3952 |
|
@param |
| 3953 |
|
@param |
| 3954 |
|
@return |
| 3955 |
|
|
| 3956 |
|
TypeList.Generic resolveInterfaceTypes(List<String> interfaceTypeDescriptors, |
| 3957 |
|
TypePool typePool, |
| 3958 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 3959 |
|
TypeDescription definingType); |
| 3960 |
|
|
| 3961 |
|
|
| 3962 |
|
@link |
| 3963 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (28) |
Complexity: 10 |
Complexity Density: 0.59 |
|
| 3964 |
|
class Tokenized implements ForType { |
| 3965 |
|
|
| 3966 |
|
|
| 3967 |
|
|
| 3968 |
|
|
| 3969 |
|
private final GenericTypeToken superClassToken; |
| 3970 |
|
|
| 3971 |
|
|
| 3972 |
|
|
| 3973 |
|
|
| 3974 |
|
private final List<GenericTypeToken> interfaceTypeTokens; |
| 3975 |
|
|
| 3976 |
|
|
| 3977 |
|
|
| 3978 |
|
|
| 3979 |
|
private final List<OfFormalTypeVariable> typeVariableTokens; |
| 3980 |
|
|
| 3981 |
|
|
| 3982 |
|
@link |
| 3983 |
|
|
| 3984 |
|
@param |
| 3985 |
|
@param |
| 3986 |
|
@param |
| 3987 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 3988 |
1926 |
public Tokenized(GenericTypeToken superClassToken,... |
| 3989 |
|
List<GenericTypeToken> interfaceTypeTokens, |
| 3990 |
|
List<OfFormalTypeVariable> typeVariableTokens) { |
| 3991 |
1926 |
this.superClassToken = superClassToken; |
| 3992 |
1926 |
this.interfaceTypeTokens = interfaceTypeTokens; |
| 3993 |
1926 |
this.typeVariableTokens = typeVariableTokens; |
| 3994 |
|
} |
| 3995 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 3996 |
221 |
@Override... |
| 3997 |
|
public Generic resolveSuperClass(String superClassDescriptor, |
| 3998 |
|
TypePool typePool, |
| 3999 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4000 |
|
TypeDescription definingType) { |
| 4001 |
221 |
return TokenizedGenericType.of(typePool, superClassToken, superClassDescriptor, annotationTokens, definingType); |
| 4002 |
|
} |
| 4003 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4004 |
244 |
@Override... |
| 4005 |
|
public TypeList.Generic resolveInterfaceTypes(List<String> interfaceTypeDescriptors, |
| 4006 |
|
TypePool typePool, |
| 4007 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4008 |
|
TypeDescription definingType) { |
| 4009 |
244 |
return new TokenizedGenericType.TokenList(typePool, interfaceTypeTokens, annotationTokens, interfaceTypeDescriptors, definingType); |
| 4010 |
|
} |
| 4011 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4012 |
986 |
@Override... |
| 4013 |
|
public TypeList.Generic resolveTypeVariables(TypePool typePool, |
| 4014 |
|
TypeVariableSource typeVariableSource, |
| 4015 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4016 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens) { |
| 4017 |
986 |
return new TokenizedGenericType.TypeVariableList(typePool, typeVariableTokens, typeVariableSource, annotationTokens, boundAnnotationTokens); |
| 4018 |
|
} |
| 4019 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 4020 |
7 |
@Override... |
| 4021 |
|
public boolean equals(Object other) { |
| 4022 |
1 |
if (this == other) return true; |
| 4023 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 4024 |
4 |
Tokenized tokenized = (Tokenized) other; |
| 4025 |
4 |
return superClassToken.equals(tokenized.superClassToken) |
| 4026 |
|
&& interfaceTypeTokens.equals(tokenized.interfaceTypeTokens) |
| 4027 |
|
&& typeVariableTokens.equals(tokenized.typeVariableTokens); |
| 4028 |
|
} |
| 4029 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 4030 |
5 |
@Override... |
| 4031 |
|
public int hashCode() { |
| 4032 |
5 |
int result = superClassToken.hashCode(); |
| 4033 |
5 |
result = 31 * result + interfaceTypeTokens.hashCode(); |
| 4034 |
5 |
result = 31 * result + typeVariableTokens.hashCode(); |
| 4035 |
5 |
return result; |
| 4036 |
|
} |
| 4037 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4038 |
5 |
@Override... |
| 4039 |
|
public String toString() { |
| 4040 |
5 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForType.Tokenized{" + |
| 4041 |
|
"superClassToken=" + superClassToken + |
| 4042 |
|
", interfaceTypeTokens=" + interfaceTypeTokens + |
| 4043 |
|
", typeVariableTokens=" + typeVariableTokens + |
| 4044 |
|
'}'; |
| 4045 |
|
} |
| 4046 |
|
} |
| 4047 |
|
} |
| 4048 |
|
|
| 4049 |
|
|
| 4050 |
|
@link |
| 4051 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 4052 |
|
interface ForMethod extends Resolution { |
| 4053 |
|
|
| 4054 |
|
|
| 4055 |
|
|
| 4056 |
|
|
| 4057 |
|
@param |
| 4058 |
|
@param |
| 4059 |
|
@param |
| 4060 |
|
@param |
| 4061 |
|
@return |
| 4062 |
|
|
| 4063 |
|
Generic resolveReturnType(String returnTypeDescriptor, |
| 4064 |
|
TypePool typePool, |
| 4065 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4066 |
|
MethodDescription.InDefinedShape definingMethod); |
| 4067 |
|
|
| 4068 |
|
|
| 4069 |
|
|
| 4070 |
|
|
| 4071 |
|
@param |
| 4072 |
|
@param |
| 4073 |
|
@param |
| 4074 |
|
@param |
| 4075 |
|
@return |
| 4076 |
|
|
| 4077 |
|
TypeList.Generic resolveParameterTypes(List<String> parameterTypeDescriptors, |
| 4078 |
|
TypePool typePool, |
| 4079 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4080 |
|
MethodDescription.InDefinedShape definingMethod); |
| 4081 |
|
|
| 4082 |
|
|
| 4083 |
|
|
| 4084 |
|
|
| 4085 |
|
@param |
| 4086 |
|
@param |
| 4087 |
|
@param |
| 4088 |
|
@param |
| 4089 |
|
@return |
| 4090 |
|
|
| 4091 |
|
TypeList.Generic resolveExceptionTypes(List<String> exceptionTypeDescriptors, |
| 4092 |
|
TypePool typePool, |
| 4093 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4094 |
|
MethodDescription.InDefinedShape definingMethod); |
| 4095 |
|
|
| 4096 |
|
|
| 4097 |
|
@link |
| 4098 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (34) |
Complexity: 12 |
Complexity Density: 0.6 |
|
| 4099 |
|
class Tokenized implements ForMethod { |
| 4100 |
|
|
| 4101 |
|
|
| 4102 |
|
|
| 4103 |
|
|
| 4104 |
|
private final GenericTypeToken returnTypeToken; |
| 4105 |
|
|
| 4106 |
|
|
| 4107 |
|
|
| 4108 |
|
|
| 4109 |
|
private final List<GenericTypeToken> parameterTypeTokens; |
| 4110 |
|
|
| 4111 |
|
|
| 4112 |
|
|
| 4113 |
|
|
| 4114 |
|
private final List<GenericTypeToken> exceptionTypeTokens; |
| 4115 |
|
|
| 4116 |
|
|
| 4117 |
|
|
| 4118 |
|
|
| 4119 |
|
private final List<OfFormalTypeVariable> typeVariableTokens; |
| 4120 |
|
|
| 4121 |
|
|
| 4122 |
|
@link |
| 4123 |
|
|
| 4124 |
|
@param |
| 4125 |
|
@param |
| 4126 |
|
@param |
| 4127 |
|
@param |
| 4128 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 4129 |
12523 |
public Tokenized(GenericTypeToken returnTypeToken,... |
| 4130 |
|
List<GenericTypeToken> parameterTypeTokens, |
| 4131 |
|
List<GenericTypeToken> exceptionTypeTokens, |
| 4132 |
|
List<OfFormalTypeVariable> typeVariableTokens) { |
| 4133 |
12523 |
this.returnTypeToken = returnTypeToken; |
| 4134 |
12523 |
this.parameterTypeTokens = parameterTypeTokens; |
| 4135 |
12523 |
this.exceptionTypeTokens = exceptionTypeTokens; |
| 4136 |
12523 |
this.typeVariableTokens = typeVariableTokens; |
| 4137 |
|
} |
| 4138 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4139 |
546 |
@Override... |
| 4140 |
|
public Generic resolveReturnType(String returnTypeDescriptor, |
| 4141 |
|
TypePool typePool, |
| 4142 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4143 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 4144 |
546 |
return TokenizedGenericType.of(typePool, returnTypeToken, returnTypeDescriptor, annotationTokens, definingMethod); |
| 4145 |
|
} |
| 4146 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4147 |
318 |
@Override... |
| 4148 |
|
public TypeList.Generic resolveParameterTypes(List<String> parameterTypeDescriptors, |
| 4149 |
|
TypePool typePool, |
| 4150 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4151 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 4152 |
318 |
return new TokenizedGenericType.TokenList(typePool, parameterTypeTokens, annotationTokens, parameterTypeDescriptors, definingMethod); |
| 4153 |
|
} |
| 4154 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 4155 |
27 |
@Override... |
| 4156 |
|
public TypeList.Generic resolveExceptionTypes(List<String> exceptionTypeDescriptors, |
| 4157 |
|
TypePool typePool, |
| 4158 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4159 |
|
MethodDescription.InDefinedShape definingMethod) { |
| 4160 |
|
|
| 4161 |
27 |
return exceptionTypeTokens.isEmpty() |
| 4162 |
|
? Raw.INSTANCE.resolveExceptionTypes(exceptionTypeDescriptors, typePool, annotationTokens, definingMethod) |
| 4163 |
|
: new TokenizedGenericType.TokenList(typePool, exceptionTypeTokens, annotationTokens, exceptionTypeDescriptors, definingMethod); |
| 4164 |
|
} |
| 4165 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4166 |
617 |
@Override... |
| 4167 |
|
public TypeList.Generic resolveTypeVariables(TypePool typePool, |
| 4168 |
|
TypeVariableSource typeVariableSource, |
| 4169 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4170 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens) { |
| 4171 |
617 |
return new TokenizedGenericType.TypeVariableList(typePool, typeVariableTokens, typeVariableSource, annotationTokens, boundAnnotationTokens); |
| 4172 |
|
} |
| 4173 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 4174 |
8 |
@Override... |
| 4175 |
|
public boolean equals(Object other) { |
| 4176 |
1 |
if (this == other) return true; |
| 4177 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 4178 |
5 |
Tokenized tokenized = (Tokenized) other; |
| 4179 |
5 |
return returnTypeToken.equals(tokenized.returnTypeToken) |
| 4180 |
|
&& parameterTypeTokens.equals(tokenized.parameterTypeTokens) |
| 4181 |
|
&& exceptionTypeTokens.equals(tokenized.exceptionTypeTokens) |
| 4182 |
|
&& typeVariableTokens.equals(tokenized.typeVariableTokens); |
| 4183 |
|
} |
| 4184 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 4185 |
6 |
@Override... |
| 4186 |
|
public int hashCode() { |
| 4187 |
6 |
int result = returnTypeToken.hashCode(); |
| 4188 |
6 |
result = 31 * result + parameterTypeTokens.hashCode(); |
| 4189 |
6 |
result = 31 * result + exceptionTypeTokens.hashCode(); |
| 4190 |
6 |
result = 31 * result + typeVariableTokens.hashCode(); |
| 4191 |
6 |
return result; |
| 4192 |
|
} |
| 4193 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4194 |
6 |
@Override... |
| 4195 |
|
public String toString() { |
| 4196 |
6 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForMethod.Tokenized{" + |
| 4197 |
|
"returnTypeToken=" + returnTypeToken + |
| 4198 |
|
", parameterTypeTokens=" + parameterTypeTokens + |
| 4199 |
|
", exceptionTypeTokens=" + exceptionTypeTokens + |
| 4200 |
|
", typeVariableTokens=" + typeVariableTokens + |
| 4201 |
|
'}'; |
| 4202 |
|
} |
| 4203 |
|
} |
| 4204 |
|
} |
| 4205 |
|
|
| 4206 |
|
|
| 4207 |
|
@link |
| 4208 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 4209 |
|
interface ForField { |
| 4210 |
|
|
| 4211 |
|
|
| 4212 |
|
|
| 4213 |
|
|
| 4214 |
|
@param |
| 4215 |
|
@param |
| 4216 |
|
@param |
| 4217 |
|
@param@return |
| 4218 |
|
@return |
| 4219 |
|
|
| 4220 |
|
Generic resolveFieldType(String fieldTypeDescriptor, |
| 4221 |
|
TypePool typePool, |
| 4222 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4223 |
|
FieldDescription.InDefinedShape definingField); |
| 4224 |
|
|
| 4225 |
|
|
| 4226 |
|
@link |
| 4227 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 5 |
Complexity Density: 1 |
|
| 4228 |
|
class Tokenized implements ForField { |
| 4229 |
|
|
| 4230 |
|
|
| 4231 |
|
|
| 4232 |
|
|
| 4233 |
|
private final GenericTypeToken fieldTypeToken; |
| 4234 |
|
|
| 4235 |
|
|
| 4236 |
|
@link |
| 4237 |
|
|
| 4238 |
|
@param |
| 4239 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4240 |
2122 |
public Tokenized(GenericTypeToken fieldTypeToken) {... |
| 4241 |
2122 |
this.fieldTypeToken = fieldTypeToken; |
| 4242 |
|
} |
| 4243 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4244 |
229 |
@Override... |
| 4245 |
|
public Generic resolveFieldType(String fieldTypeDescriptor, |
| 4246 |
|
TypePool typePool, |
| 4247 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4248 |
|
FieldDescription.InDefinedShape definingField) { |
| 4249 |
229 |
return TokenizedGenericType.of(typePool, fieldTypeToken, fieldTypeDescriptor, annotationTokens, definingField.getDeclaringType()); |
| 4250 |
|
} |
| 4251 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4252 |
5 |
@Override... |
| 4253 |
|
public boolean equals(Object other) { |
| 4254 |
5 |
return this == other || other != null && getClass() == other.getClass() |
| 4255 |
|
&& fieldTypeToken.equals(((Tokenized) other).fieldTypeToken); |
| 4256 |
|
} |
| 4257 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4258 |
3 |
@Override... |
| 4259 |
|
public int hashCode() { |
| 4260 |
3 |
return fieldTypeToken.hashCode(); |
| 4261 |
|
} |
| 4262 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4263 |
3 |
@Override... |
| 4264 |
|
public String toString() { |
| 4265 |
3 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.Resolution.ForField.Tokenized{" + |
| 4266 |
|
"fieldTypeToken=" + fieldTypeToken + |
| 4267 |
|
'}'; |
| 4268 |
|
} |
| 4269 |
|
} |
| 4270 |
|
} |
| 4271 |
|
} |
| 4272 |
|
|
| 4273 |
|
|
| 4274 |
|
|
| 4275 |
|
|
| |
|
| 93.8% |
Uncovered Elements: 1 (16) |
Complexity: 8 |
Complexity Density: 1.14 |
|
| 4276 |
|
class ForRawType implements GenericTypeToken { |
| 4277 |
|
|
| 4278 |
|
|
| 4279 |
|
|
| 4280 |
|
|
| 4281 |
|
private final String name; |
| 4282 |
|
|
| 4283 |
|
|
| 4284 |
|
|
| 4285 |
|
|
| 4286 |
|
@param |
| 4287 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4288 |
12932 |
public ForRawType(String name) {... |
| 4289 |
12932 |
this.name = name; |
| 4290 |
|
} |
| 4291 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 4292 |
633 |
@Override... |
| 4293 |
|
public Generic toGenericType(TypePool typePool, |
| 4294 |
|
TypeVariableSource typeVariableSource, |
| 4295 |
|
String typePath, |
| 4296 |
|
Map<String, List<AnnotationToken>> annotationTokens) { |
| 4297 |
633 |
return new Resolution.Raw.RawAnnotatedType(typePool, |
| 4298 |
|
typePath, |
| 4299 |
633 |
annotationTokens == null |
| 4300 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 4301 |
|
: annotationTokens, |
| 4302 |
|
typePool.describe(name).resolve()); |
| 4303 |
|
} |
| 4304 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4305 |
204 |
@Override... |
| 4306 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 4307 |
204 |
return !typePool.describe(name).resolve().isInterface(); |
| 4308 |
|
} |
| 4309 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4310 |
1 |
@Override... |
| 4311 |
|
public String getTypePathPrefix() { |
| 4312 |
1 |
throw new IllegalStateException("A non-generic type cannot be the owner of a nested type: " + this); |
| 4313 |
|
} |
| 4314 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4315 |
5 |
@Override... |
| 4316 |
|
public boolean equals(Object other) { |
| 4317 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) && name.equals(((ForRawType) other).name); |
| 4318 |
|
} |
| 4319 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4320 |
3 |
@Override... |
| 4321 |
|
public int hashCode() { |
| 4322 |
3 |
return name.hashCode(); |
| 4323 |
|
} |
| 4324 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4325 |
4 |
@Override... |
| 4326 |
|
public String toString() { |
| 4327 |
4 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForRawType{" + |
| 4328 |
|
"name='" + name + '\'' + |
| 4329 |
|
'}'; |
| 4330 |
|
} |
| 4331 |
|
} |
| 4332 |
|
|
| 4333 |
|
|
| 4334 |
|
|
| 4335 |
|
|
| |
|
| 89.5% |
Uncovered Elements: 2 (19) |
Complexity: 8 |
Complexity Density: 0.8 |
|
| 4336 |
|
class ForTypeVariable implements GenericTypeToken { |
| 4337 |
|
|
| 4338 |
|
|
| 4339 |
|
|
| 4340 |
|
|
| 4341 |
|
private final String symbol; |
| 4342 |
|
|
| 4343 |
|
|
| 4344 |
|
|
| 4345 |
|
|
| 4346 |
|
@param |
| 4347 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4348 |
13185 |
public ForTypeVariable(String symbol) {... |
| 4349 |
13185 |
this.symbol = symbol; |
| 4350 |
|
} |
| 4351 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 4352 |
892 |
@Override... |
| 4353 |
|
public Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<AnnotationToken>> annotationTokens) { |
| 4354 |
892 |
Generic typeVariable = typeVariableSource.findVariable(symbol); |
| 4355 |
892 |
if (typeVariable == null) { |
| 4356 |
0 |
throw new IllegalStateException("Cannot resolve type variable '" + symbol + "' for " + typeVariableSource); |
| 4357 |
|
} else { |
| 4358 |
892 |
return new AnnotatedTypeVariable(typePool, annotationTokens.get(typePath), typeVariable); |
| 4359 |
|
} |
| 4360 |
|
} |
| 4361 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4362 |
32 |
@Override... |
| 4363 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 4364 |
32 |
return true; |
| 4365 |
|
} |
| 4366 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4367 |
1 |
@Override... |
| 4368 |
|
public String getTypePathPrefix() { |
| 4369 |
1 |
throw new IllegalStateException("A type variable cannot be the owner of a nested type: " + this); |
| 4370 |
|
} |
| 4371 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4372 |
5 |
@Override... |
| 4373 |
|
public boolean equals(Object other) { |
| 4374 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) && symbol.equals(((ForTypeVariable) other).symbol); |
| 4375 |
|
} |
| 4376 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4377 |
3 |
@Override... |
| 4378 |
|
public int hashCode() { |
| 4379 |
3 |
return symbol.hashCode(); |
| 4380 |
|
} |
| 4381 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4382 |
4 |
@Override... |
| 4383 |
|
public String toString() { |
| 4384 |
4 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariable{" + |
| 4385 |
|
"symbol='" + symbol + '\'' + |
| 4386 |
|
'}'; |
| 4387 |
|
} |
| 4388 |
|
|
| 4389 |
|
|
| 4390 |
|
|
| 4391 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 5 |
Complexity Density: 0.71 |
|
| 4392 |
|
protected static class AnnotatedTypeVariable extends Generic.OfTypeVariable { |
| 4393 |
|
|
| 4394 |
|
|
| 4395 |
|
|
| 4396 |
|
|
| 4397 |
|
private final TypePool typePool; |
| 4398 |
|
|
| 4399 |
|
|
| 4400 |
|
|
| 4401 |
|
|
| 4402 |
|
private final List<AnnotationToken> annotationTokens; |
| 4403 |
|
|
| 4404 |
|
|
| 4405 |
|
|
| 4406 |
|
|
| 4407 |
|
private final Generic typeVariable; |
| 4408 |
|
|
| 4409 |
|
|
| 4410 |
|
|
| 4411 |
|
|
| 4412 |
|
@param |
| 4413 |
|
@param |
| 4414 |
|
@param |
| 4415 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 4416 |
892 |
protected AnnotatedTypeVariable(TypePool typePool, List<AnnotationToken> annotationTokens, Generic typeVariable) {... |
| 4417 |
892 |
this.typePool = typePool; |
| 4418 |
892 |
this.annotationTokens = annotationTokens; |
| 4419 |
892 |
this.typeVariable = typeVariable; |
| 4420 |
|
} |
| 4421 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4422 |
214 |
@Override... |
| 4423 |
|
public TypeList.Generic getUpperBounds() { |
| 4424 |
214 |
return typeVariable.getUpperBounds(); |
| 4425 |
|
} |
| 4426 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4427 |
443 |
@Override... |
| 4428 |
|
public TypeVariableSource getVariableSource() { |
| 4429 |
443 |
return typeVariable.getVariableSource(); |
| 4430 |
|
} |
| 4431 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4432 |
260 |
@Override... |
| 4433 |
|
public String getSymbol() { |
| 4434 |
260 |
return typeVariable.getSymbol(); |
| 4435 |
|
} |
| 4436 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4437 |
138 |
@Override... |
| 4438 |
|
public AnnotationList getDeclaredAnnotations() { |
| 4439 |
138 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens); |
| 4440 |
|
} |
| 4441 |
|
} |
| 4442 |
|
|
| 4443 |
|
|
| 4444 |
|
|
| 4445 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (15) |
Complexity: 7 |
Complexity Density: 1.17 |
|
| 4446 |
|
public static class Formal implements GenericTypeToken.OfFormalTypeVariable { |
| 4447 |
|
|
| 4448 |
|
|
| 4449 |
|
|
| 4450 |
|
|
| 4451 |
|
private final String symbol; |
| 4452 |
|
|
| 4453 |
|
|
| 4454 |
|
|
| 4455 |
|
|
| 4456 |
|
private final List<GenericTypeToken> boundTypeTokens; |
| 4457 |
|
|
| 4458 |
|
|
| 4459 |
|
|
| 4460 |
|
|
| 4461 |
|
@param |
| 4462 |
|
@param |
| 4463 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 4464 |
3173 |
public Formal(String symbol, List<GenericTypeToken> boundTypeTokens) {... |
| 4465 |
3173 |
this.symbol = symbol; |
| 4466 |
3173 |
this.boundTypeTokens = boundTypeTokens; |
| 4467 |
|
} |
| 4468 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 3 |
Complexity Density: 3 |
|
| 4469 |
2544 |
@Override... |
| 4470 |
|
public Generic toGenericType(TypePool typePool, |
| 4471 |
|
TypeVariableSource typeVariableSource, |
| 4472 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4473 |
|
Map<Integer, Map<String, List<AnnotationToken>>> boundaryAnnotationTokens) { |
| 4474 |
2544 |
return new LazyTypeVariable(typePool, |
| 4475 |
|
typeVariableSource, |
| 4476 |
2544 |
annotationTokens == null |
| 4477 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 4478 |
|
: annotationTokens, |
| 4479 |
2544 |
boundaryAnnotationTokens == null |
| 4480 |
|
? Collections.<Integer, Map<String, List<AnnotationToken>>>emptyMap() |
| 4481 |
|
: boundaryAnnotationTokens, |
| 4482 |
|
symbol, |
| 4483 |
|
boundTypeTokens); |
| 4484 |
|
} |
| 4485 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4486 |
6 |
@Override... |
| 4487 |
|
public boolean equals(Object other) { |
| 4488 |
6 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 4489 |
|
&& symbol.equals(((Formal) other).symbol) |
| 4490 |
|
&& boundTypeTokens.equals(((Formal) other).boundTypeTokens); |
| 4491 |
|
} |
| 4492 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4493 |
4 |
@Override... |
| 4494 |
|
public int hashCode() { |
| 4495 |
4 |
return symbol.hashCode() + 31 * boundTypeTokens.hashCode(); |
| 4496 |
|
} |
| 4497 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4498 |
4 |
@Override... |
| 4499 |
|
public String toString() { |
| 4500 |
4 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForTypeVariable.Formal{" + |
| 4501 |
|
"symbol='" + symbol + '\'' + |
| 4502 |
|
"boundTypeTokens='" + boundTypeTokens + '\'' + |
| 4503 |
|
'}'; |
| 4504 |
|
} |
| 4505 |
|
|
| 4506 |
|
|
| 4507 |
|
|
| 4508 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (15) |
Complexity: 5 |
Complexity Density: 0.5 |
|
| 4509 |
|
protected static class LazyTypeVariable extends Generic.OfTypeVariable { |
| 4510 |
|
|
| 4511 |
|
|
| 4512 |
|
|
| 4513 |
|
|
| 4514 |
|
private final TypePool typePool; |
| 4515 |
|
|
| 4516 |
|
|
| 4517 |
|
|
| 4518 |
|
|
| 4519 |
|
private final TypeVariableSource typeVariableSource; |
| 4520 |
|
|
| 4521 |
|
|
| 4522 |
|
|
| 4523 |
|
|
| 4524 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 4525 |
|
|
| 4526 |
|
|
| 4527 |
|
|
| 4528 |
|
|
| 4529 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> boundaryAnnotationTokens; |
| 4530 |
|
|
| 4531 |
|
|
| 4532 |
|
|
| 4533 |
|
|
| 4534 |
|
private final String symbol; |
| 4535 |
|
|
| 4536 |
|
|
| 4537 |
|
|
| 4538 |
|
|
| 4539 |
|
private final List<GenericTypeToken> boundTypeTokens; |
| 4540 |
|
|
| 4541 |
|
|
| 4542 |
|
|
| 4543 |
|
|
| 4544 |
|
@param |
| 4545 |
|
@param |
| 4546 |
|
@param |
| 4547 |
|
@param |
| 4548 |
|
@param |
| 4549 |
|
@param |
| 4550 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 4551 |
2544 |
protected LazyTypeVariable(TypePool typePool,... |
| 4552 |
|
TypeVariableSource typeVariableSource, |
| 4553 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4554 |
|
Map<Integer, Map<String, List<AnnotationToken>>> boundaryAnnotationTokens, |
| 4555 |
|
String symbol, |
| 4556 |
|
List<GenericTypeToken> boundTypeTokens) { |
| 4557 |
2544 |
this.typePool = typePool; |
| 4558 |
2544 |
this.typeVariableSource = typeVariableSource; |
| 4559 |
2544 |
this.annotationTokens = annotationTokens; |
| 4560 |
2544 |
this.boundaryAnnotationTokens = boundaryAnnotationTokens; |
| 4561 |
2544 |
this.symbol = symbol; |
| 4562 |
2544 |
this.boundTypeTokens = boundTypeTokens; |
| 4563 |
|
} |
| 4564 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4565 |
346 |
@Override... |
| 4566 |
|
public TypeList.Generic getUpperBounds() { |
| 4567 |
346 |
return new LazyBoundTokenList(typePool, typeVariableSource, boundaryAnnotationTokens, boundTypeTokens); |
| 4568 |
|
} |
| 4569 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4570 |
741 |
@Override... |
| 4571 |
|
public TypeVariableSource getVariableSource() { |
| 4572 |
741 |
return typeVariableSource; |
| 4573 |
|
} |
| 4574 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4575 |
2206 |
@Override... |
| 4576 |
|
public String getSymbol() { |
| 4577 |
2206 |
return symbol; |
| 4578 |
|
} |
| 4579 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4580 |
38 |
@Override... |
| 4581 |
|
public AnnotationList getDeclaredAnnotations() { |
| 4582 |
38 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(EMPTY_TYPE_PATH)); |
| 4583 |
|
} |
| 4584 |
|
|
| 4585 |
|
|
| 4586 |
|
|
| 4587 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 5 |
Complexity Density: 0.71 |
|
| 4588 |
|
protected static class LazyBoundTokenList extends TypeList.Generic.AbstractBase { |
| 4589 |
|
|
| 4590 |
|
|
| 4591 |
|
|
| 4592 |
|
|
| 4593 |
|
private final TypePool typePool; |
| 4594 |
|
|
| 4595 |
|
|
| 4596 |
|
|
| 4597 |
|
|
| 4598 |
|
private final TypeVariableSource typeVariableSource; |
| 4599 |
|
|
| 4600 |
|
|
| 4601 |
|
|
| 4602 |
|
|
| 4603 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens; |
| 4604 |
|
|
| 4605 |
|
|
| 4606 |
|
|
| 4607 |
|
|
| 4608 |
|
private final List<GenericTypeToken> boundTypeTokens; |
| 4609 |
|
|
| 4610 |
|
|
| 4611 |
|
|
| 4612 |
|
|
| 4613 |
|
@param |
| 4614 |
|
@param |
| 4615 |
|
@param |
| 4616 |
|
@param |
| 4617 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 4618 |
346 |
protected LazyBoundTokenList(TypePool typePool,... |
| 4619 |
|
TypeVariableSource typeVariableSource, |
| 4620 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 4621 |
|
List<GenericTypeToken> boundTypeTokens) { |
| 4622 |
346 |
this.typePool = typePool; |
| 4623 |
346 |
this.typeVariableSource = typeVariableSource; |
| 4624 |
346 |
this.annotationTokens = annotationTokens; |
| 4625 |
346 |
this.boundTypeTokens = boundTypeTokens; |
| 4626 |
|
} |
| 4627 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 3 |
Complexity Density: 1.5 |
|
| 4628 |
310 |
@Override... |
| 4629 |
|
public Generic get(int index) { |
| 4630 |
310 |
Map<String, List<AnnotationToken>> annotationTokens = this.annotationTokens.get(index + (boundTypeTokens.get(0).isPrimaryBound(typePool) |
| 4631 |
|
? 0 |
| 4632 |
|
: 1)); |
| 4633 |
310 |
return boundTypeTokens.get(index).toGenericType(typePool, |
| 4634 |
|
typeVariableSource, |
| 4635 |
|
EMPTY_TYPE_PATH, |
| 4636 |
310 |
annotationTokens == null |
| 4637 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 4638 |
|
: annotationTokens); |
| 4639 |
|
} |
| 4640 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4641 |
264 |
@Override... |
| 4642 |
|
public int size() { |
| 4643 |
264 |
return boundTypeTokens.size(); |
| 4644 |
|
} |
| 4645 |
|
} |
| 4646 |
|
} |
| 4647 |
|
} |
| 4648 |
|
} |
| 4649 |
|
|
| 4650 |
|
|
| 4651 |
|
|
| 4652 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 7 |
Complexity Density: 1 |
|
| 4653 |
|
class ForGenericArray implements GenericTypeToken { |
| 4654 |
|
|
| 4655 |
|
|
| 4656 |
|
|
| 4657 |
|
|
| 4658 |
|
private final GenericTypeToken componentTypeToken; |
| 4659 |
|
|
| 4660 |
|
|
| 4661 |
|
|
| 4662 |
|
|
| 4663 |
|
@param |
| 4664 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4665 |
2863 |
public ForGenericArray(GenericTypeToken componentTypeToken) {... |
| 4666 |
2863 |
this.componentTypeToken = componentTypeToken; |
| 4667 |
|
} |
| 4668 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4669 |
288 |
@Override... |
| 4670 |
|
public Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<AnnotationToken>> annotationTokens) { |
| 4671 |
288 |
return new LazyGenericArray(typePool, typeVariableSource, typePath, annotationTokens, componentTypeToken); |
| 4672 |
|
} |
| 4673 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4674 |
1 |
@Override... |
| 4675 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 4676 |
1 |
throw new IllegalStateException("A generic array type cannot be a type variable bound: " + this); |
| 4677 |
|
} |
| 4678 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4679 |
1 |
@Override... |
| 4680 |
|
public String getTypePathPrefix() { |
| 4681 |
1 |
throw new IllegalStateException("A generic array type cannot be the owner of a nested type: " + this); |
| 4682 |
|
} |
| 4683 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4684 |
5 |
@Override... |
| 4685 |
|
public boolean equals(Object other) { |
| 4686 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 4687 |
|
&& componentTypeToken.equals(((ForGenericArray) other).componentTypeToken); |
| 4688 |
|
} |
| 4689 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4690 |
3 |
@Override... |
| 4691 |
|
public int hashCode() { |
| 4692 |
3 |
return componentTypeToken.hashCode(); |
| 4693 |
|
} |
| 4694 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4695 |
5 |
@Override... |
| 4696 |
|
public String toString() { |
| 4697 |
5 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForGenericArray{" + |
| 4698 |
|
"componentTypeToken='" + componentTypeToken + '\'' + |
| 4699 |
|
'}'; |
| 4700 |
|
} |
| 4701 |
|
|
| 4702 |
|
|
| 4703 |
|
|
| 4704 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.43 |
|
| 4705 |
|
protected static class LazyGenericArray extends Generic.OfGenericArray { |
| 4706 |
|
|
| 4707 |
|
|
| 4708 |
|
|
| 4709 |
|
|
| 4710 |
|
private final TypePool typePool; |
| 4711 |
|
|
| 4712 |
|
|
| 4713 |
|
|
| 4714 |
|
|
| 4715 |
|
private final TypeVariableSource typeVariableSource; |
| 4716 |
|
|
| 4717 |
|
|
| 4718 |
|
|
| 4719 |
|
|
| 4720 |
|
private final String typePath; |
| 4721 |
|
|
| 4722 |
|
|
| 4723 |
|
|
| 4724 |
|
|
| 4725 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 4726 |
|
|
| 4727 |
|
|
| 4728 |
|
|
| 4729 |
|
|
| 4730 |
|
private final GenericTypeToken componentTypeToken; |
| 4731 |
|
|
| 4732 |
|
|
| 4733 |
|
|
| 4734 |
|
|
| 4735 |
|
@param |
| 4736 |
|
@param |
| 4737 |
|
@param |
| 4738 |
|
@param |
| 4739 |
|
@param |
| 4740 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 4741 |
288 |
protected LazyGenericArray(TypePool typePool,... |
| 4742 |
|
TypeVariableSource typeVariableSource, |
| 4743 |
|
String typePath, |
| 4744 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4745 |
|
GenericTypeToken componentTypeToken) { |
| 4746 |
288 |
this.typePool = typePool; |
| 4747 |
288 |
this.typeVariableSource = typeVariableSource; |
| 4748 |
288 |
this.typePath = typePath; |
| 4749 |
288 |
this.annotationTokens = annotationTokens; |
| 4750 |
288 |
this.componentTypeToken = componentTypeToken; |
| 4751 |
|
} |
| 4752 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4753 |
280 |
@Override... |
| 4754 |
|
public Generic getComponentType() { |
| 4755 |
280 |
return componentTypeToken.toGenericType(typePool, typeVariableSource, typePath + COMPONENT_TYPE_PATH, annotationTokens); |
| 4756 |
|
} |
| 4757 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4758 |
48 |
@Override... |
| 4759 |
|
public AnnotationList getDeclaredAnnotations() { |
| 4760 |
48 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath)); |
| 4761 |
|
} |
| 4762 |
|
} |
| 4763 |
|
} |
| 4764 |
|
|
| 4765 |
|
|
| 4766 |
|
|
| 4767 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 7 |
Complexity Density: 1 |
|
| 4768 |
|
class ForLowerBoundWildcard implements GenericTypeToken { |
| 4769 |
|
|
| 4770 |
|
|
| 4771 |
|
|
| 4772 |
|
|
| 4773 |
|
private final GenericTypeToken boundTypeToken; |
| 4774 |
|
|
| 4775 |
|
|
| 4776 |
|
|
| 4777 |
|
|
| 4778 |
|
@param |
| 4779 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4780 |
1140 |
public ForLowerBoundWildcard(GenericTypeToken boundTypeToken) {... |
| 4781 |
1140 |
this.boundTypeToken = boundTypeToken; |
| 4782 |
|
} |
| 4783 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4784 |
170 |
@Override... |
| 4785 |
|
public Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<AnnotationToken>> annotationTokens) { |
| 4786 |
170 |
return new LazyLowerBoundWildcard(typePool, typeVariableSource, typePath, annotationTokens, boundTypeToken); |
| 4787 |
|
} |
| 4788 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4789 |
1 |
@Override... |
| 4790 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 4791 |
1 |
throw new IllegalStateException("A wildcard type cannot be a type variable bound: " + this); |
| 4792 |
|
} |
| 4793 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4794 |
1 |
@Override... |
| 4795 |
|
public String getTypePathPrefix() { |
| 4796 |
1 |
throw new IllegalStateException("A lower bound wildcard cannot be the owner of a nested type: " + this); |
| 4797 |
|
} |
| 4798 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4799 |
5 |
@Override... |
| 4800 |
|
public boolean equals(Object other) { |
| 4801 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 4802 |
|
&& boundTypeToken.equals(((ForLowerBoundWildcard) other).boundTypeToken); |
| 4803 |
|
} |
| 4804 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4805 |
3 |
@Override... |
| 4806 |
|
public int hashCode() { |
| 4807 |
3 |
return boundTypeToken.hashCode(); |
| 4808 |
|
} |
| 4809 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4810 |
5 |
@Override... |
| 4811 |
|
public String toString() { |
| 4812 |
5 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForLowerBoundWildcard{" + |
| 4813 |
|
"boundTypeToken=" + boundTypeToken + |
| 4814 |
|
'}'; |
| 4815 |
|
} |
| 4816 |
|
|
| 4817 |
|
|
| 4818 |
|
|
| 4819 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 4820 |
|
protected static class LazyLowerBoundWildcard extends Generic.OfWildcardType { |
| 4821 |
|
|
| 4822 |
|
|
| 4823 |
|
|
| 4824 |
|
|
| 4825 |
|
private final TypePool typePool; |
| 4826 |
|
|
| 4827 |
|
|
| 4828 |
|
|
| 4829 |
|
|
| 4830 |
|
private final TypeVariableSource typeVariableSource; |
| 4831 |
|
|
| 4832 |
|
|
| 4833 |
|
|
| 4834 |
|
|
| 4835 |
|
private final String typePath; |
| 4836 |
|
|
| 4837 |
|
|
| 4838 |
|
|
| 4839 |
|
|
| 4840 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 4841 |
|
|
| 4842 |
|
|
| 4843 |
|
|
| 4844 |
|
|
| 4845 |
|
private final GenericTypeToken boundTypeToken; |
| 4846 |
|
|
| 4847 |
|
|
| 4848 |
|
|
| 4849 |
|
|
| 4850 |
|
@param |
| 4851 |
|
@param |
| 4852 |
|
@param |
| 4853 |
|
@param |
| 4854 |
|
@param |
| 4855 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 4856 |
170 |
protected LazyLowerBoundWildcard(TypePool typePool,... |
| 4857 |
|
TypeVariableSource typeVariableSource, |
| 4858 |
|
String typePath, |
| 4859 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4860 |
|
GenericTypeToken boundTypeToken) { |
| 4861 |
170 |
this.typePool = typePool; |
| 4862 |
170 |
this.typeVariableSource = typeVariableSource; |
| 4863 |
170 |
this.typePath = typePath; |
| 4864 |
170 |
this.annotationTokens = annotationTokens; |
| 4865 |
170 |
this.boundTypeToken = boundTypeToken; |
| 4866 |
|
} |
| 4867 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4868 |
8 |
@Override... |
| 4869 |
|
public TypeList.Generic getUpperBounds() { |
| 4870 |
8 |
return new TypeList.Generic.Explicit(Generic.OBJECT); |
| 4871 |
|
} |
| 4872 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4873 |
156 |
@Override... |
| 4874 |
|
public TypeList.Generic getLowerBounds() { |
| 4875 |
156 |
return new LazyTokenList.ForWildcardBound(typePool, typeVariableSource, typePath, annotationTokens, boundTypeToken); |
| 4876 |
|
} |
| 4877 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4878 |
6 |
@Override... |
| 4879 |
|
public AnnotationList getDeclaredAnnotations() { |
| 4880 |
6 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath)); |
| 4881 |
|
} |
| 4882 |
|
} |
| 4883 |
|
} |
| 4884 |
|
|
| 4885 |
|
|
| 4886 |
|
|
| 4887 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 7 |
Complexity Density: 1 |
|
| 4888 |
|
class ForUpperBoundWildcard implements GenericTypeToken { |
| 4889 |
|
|
| 4890 |
|
|
| 4891 |
|
|
| 4892 |
|
|
| 4893 |
|
private final GenericTypeToken boundTypeToken; |
| 4894 |
|
|
| 4895 |
|
|
| 4896 |
|
|
| 4897 |
|
|
| 4898 |
|
@param |
| 4899 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4900 |
1837 |
public ForUpperBoundWildcard(GenericTypeToken boundTypeToken) {... |
| 4901 |
1837 |
this.boundTypeToken = boundTypeToken; |
| 4902 |
|
} |
| 4903 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4904 |
108 |
@Override... |
| 4905 |
|
public Generic toGenericType(TypePool typePool, |
| 4906 |
|
TypeVariableSource typeVariableSource, |
| 4907 |
|
String typePath, |
| 4908 |
|
Map<String, List<AnnotationToken>> annotationTokens) { |
| 4909 |
108 |
return new LazyUpperBoundWildcard(typePool, typeVariableSource, typePath, annotationTokens, boundTypeToken); |
| 4910 |
|
} |
| 4911 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4912 |
1 |
@Override... |
| 4913 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 4914 |
1 |
throw new IllegalStateException("A wildcard type cannot be a type variable bound: " + this); |
| 4915 |
|
} |
| 4916 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4917 |
1 |
@Override... |
| 4918 |
|
public String getTypePathPrefix() { |
| 4919 |
1 |
throw new IllegalStateException("An upper bound wildcard cannot be the owner of a nested type: " + this); |
| 4920 |
|
} |
| 4921 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4922 |
5 |
@Override... |
| 4923 |
|
public boolean equals(Object other) { |
| 4924 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 4925 |
|
&& boundTypeToken.equals(((ForUpperBoundWildcard) other).boundTypeToken); |
| 4926 |
|
} |
| 4927 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4928 |
3 |
@Override... |
| 4929 |
|
public int hashCode() { |
| 4930 |
3 |
return boundTypeToken.hashCode(); |
| 4931 |
|
} |
| 4932 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4933 |
5 |
@Override... |
| 4934 |
|
public String toString() { |
| 4935 |
5 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForUpperBoundWildcard{" + |
| 4936 |
|
"boundTypeToken=" + boundTypeToken + |
| 4937 |
|
'}'; |
| 4938 |
|
} |
| 4939 |
|
|
| 4940 |
|
|
| 4941 |
|
|
| 4942 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 4 |
Complexity Density: 0.5 |
|
| 4943 |
|
protected static class LazyUpperBoundWildcard extends Generic.OfWildcardType { |
| 4944 |
|
|
| 4945 |
|
|
| 4946 |
|
|
| 4947 |
|
|
| 4948 |
|
private final TypePool typePool; |
| 4949 |
|
|
| 4950 |
|
|
| 4951 |
|
|
| 4952 |
|
|
| 4953 |
|
private final TypeVariableSource typeVariableSource; |
| 4954 |
|
|
| 4955 |
|
|
| 4956 |
|
|
| 4957 |
|
|
| 4958 |
|
private final String typePath; |
| 4959 |
|
|
| 4960 |
|
|
| 4961 |
|
|
| 4962 |
|
|
| 4963 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 4964 |
|
|
| 4965 |
|
|
| 4966 |
|
|
| 4967 |
|
|
| 4968 |
|
private final GenericTypeToken boundTypeToken; |
| 4969 |
|
|
| 4970 |
|
|
| 4971 |
|
|
| 4972 |
|
|
| 4973 |
|
@param |
| 4974 |
|
@param |
| 4975 |
|
@param |
| 4976 |
|
@param |
| 4977 |
|
@param |
| 4978 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 4979 |
108 |
protected LazyUpperBoundWildcard(TypePool typePool,... |
| 4980 |
|
TypeVariableSource typeVariableSource, |
| 4981 |
|
String typePath, |
| 4982 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 4983 |
|
GenericTypeToken boundTypeToken) { |
| 4984 |
108 |
this.typePool = typePool; |
| 4985 |
108 |
this.typeVariableSource = typeVariableSource; |
| 4986 |
108 |
this.typePath = typePath; |
| 4987 |
108 |
this.annotationTokens = annotationTokens; |
| 4988 |
108 |
this.boundTypeToken = boundTypeToken; |
| 4989 |
|
} |
| 4990 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4991 |
92 |
@Override... |
| 4992 |
|
public TypeList.Generic getUpperBounds() { |
| 4993 |
92 |
return new LazyTokenList.ForWildcardBound(typePool, typeVariableSource, typePath, annotationTokens, boundTypeToken); |
| 4994 |
|
} |
| 4995 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 4996 |
76 |
@Override... |
| 4997 |
|
public TypeList.Generic getLowerBounds() { |
| 4998 |
76 |
return new TypeList.Generic.Empty(); |
| 4999 |
|
} |
| 5000 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5001 |
6 |
@Override... |
| 5002 |
|
public AnnotationList getDeclaredAnnotations() { |
| 5003 |
6 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath)); |
| 5004 |
|
} |
| 5005 |
|
} |
| 5006 |
|
} |
| 5007 |
|
|
| 5008 |
|
|
| 5009 |
|
|
| 5010 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (15) |
Complexity: 7 |
Complexity Density: 0.88 |
|
| 5011 |
|
class ForParameterizedType implements GenericTypeToken { |
| 5012 |
|
|
| 5013 |
|
|
| 5014 |
|
|
| 5015 |
|
|
| 5016 |
|
private final String name; |
| 5017 |
|
|
| 5018 |
|
|
| 5019 |
|
|
| 5020 |
|
|
| 5021 |
|
private final List<GenericTypeToken> parameterTypeTokens; |
| 5022 |
|
|
| 5023 |
|
|
| 5024 |
|
|
| 5025 |
|
|
| 5026 |
|
@param |
| 5027 |
|
@param |
| 5028 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 5029 |
13431 |
public ForParameterizedType(String name, List<GenericTypeToken> parameterTypeTokens) {... |
| 5030 |
13431 |
this.name = name; |
| 5031 |
13431 |
this.parameterTypeTokens = parameterTypeTokens; |
| 5032 |
|
} |
| 5033 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5034 |
1171 |
@Override... |
| 5035 |
|
public Generic toGenericType(TypePool typePool, TypeVariableSource typeVariableSource, String typePath, Map<String, List<AnnotationToken>> annotationTokens) { |
| 5036 |
1171 |
return new LazyParameterizedType(typePool, typeVariableSource, typePath, annotationTokens, name, parameterTypeTokens); |
| 5037 |
|
} |
| 5038 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5039 |
74 |
@Override... |
| 5040 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 5041 |
74 |
return !typePool.describe(name).resolve().isInterface(); |
| 5042 |
|
} |
| 5043 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5044 |
60 |
@Override... |
| 5045 |
|
public String getTypePathPrefix() { |
| 5046 |
60 |
return String.valueOf(INNER_CLASS_PATH); |
| 5047 |
|
} |
| 5048 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5049 |
6 |
@Override... |
| 5050 |
|
public boolean equals(Object other) { |
| 5051 |
6 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 5052 |
|
&& name.equals(((ForParameterizedType) other).name) |
| 5053 |
|
&& parameterTypeTokens.equals(((ForParameterizedType) other).parameterTypeTokens); |
| 5054 |
|
} |
| 5055 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5056 |
4 |
@Override... |
| 5057 |
|
public int hashCode() { |
| 5058 |
4 |
return name.hashCode() + 31 * parameterTypeTokens.hashCode(); |
| 5059 |
|
} |
| 5060 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5061 |
4 |
@Override... |
| 5062 |
|
public String toString() { |
| 5063 |
4 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType{" + |
| 5064 |
|
"name='" + name + '\'' + |
| 5065 |
|
", parameterTypeTokens=" + parameterTypeTokens + |
| 5066 |
|
'}'; |
| 5067 |
|
} |
| 5068 |
|
|
| 5069 |
|
|
| 5070 |
|
|
| 5071 |
|
|
| |
|
| 85.7% |
Uncovered Elements: 4 (28) |
Complexity: 10 |
Complexity Density: 0.59 |
|
| 5072 |
|
public static class Nested implements GenericTypeToken { |
| 5073 |
|
|
| 5074 |
|
|
| 5075 |
|
|
| 5076 |
|
|
| 5077 |
|
private final String name; |
| 5078 |
|
|
| 5079 |
|
|
| 5080 |
|
|
| 5081 |
|
|
| 5082 |
|
private final List<GenericTypeToken> parameterTypeTokens; |
| 5083 |
|
|
| 5084 |
|
|
| 5085 |
|
|
| 5086 |
|
|
| 5087 |
|
private final GenericTypeToken ownerTypeToken; |
| 5088 |
|
|
| 5089 |
|
|
| 5090 |
|
|
| 5091 |
|
|
| 5092 |
|
@param |
| 5093 |
|
@param |
| 5094 |
|
@param |
| 5095 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 5096 |
455 |
public Nested(String name, List<GenericTypeToken> parameterTypeTokens, GenericTypeToken ownerTypeToken) {... |
| 5097 |
455 |
this.name = name; |
| 5098 |
455 |
this.parameterTypeTokens = parameterTypeTokens; |
| 5099 |
455 |
this.ownerTypeToken = ownerTypeToken; |
| 5100 |
|
} |
| 5101 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5102 |
98 |
@Override... |
| 5103 |
|
public Generic toGenericType(TypePool typePool, |
| 5104 |
|
TypeVariableSource typeVariableSource, |
| 5105 |
|
String typePath, |
| 5106 |
|
Map<String, List<AnnotationToken>> annotationTokens) { |
| 5107 |
98 |
return new LazyParameterizedType(typePool, typeVariableSource, typePath, annotationTokens, name, parameterTypeTokens, ownerTypeToken); |
| 5108 |
|
} |
| 5109 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5110 |
0 |
@Override... |
| 5111 |
|
public String getTypePathPrefix() { |
| 5112 |
0 |
return ownerTypeToken.getTypePathPrefix() + INNER_CLASS_PATH; |
| 5113 |
|
} |
| 5114 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5115 |
0 |
@Override... |
| 5116 |
|
public boolean isPrimaryBound(TypePool typePool) { |
| 5117 |
0 |
return !typePool.describe(name).resolve().isInterface(); |
| 5118 |
|
} |
| 5119 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 5120 |
7 |
@Override... |
| 5121 |
|
public boolean equals(Object other) { |
| 5122 |
1 |
if (this == other) return true; |
| 5123 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 5124 |
4 |
Nested nested = (Nested) other; |
| 5125 |
4 |
return name.equals(nested.name) |
| 5126 |
|
&& parameterTypeTokens.equals(nested.parameterTypeTokens) |
| 5127 |
|
&& ownerTypeToken.equals(nested.ownerTypeToken); |
| 5128 |
|
} |
| 5129 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 5130 |
5 |
@Override... |
| 5131 |
|
public int hashCode() { |
| 5132 |
5 |
int result = name.hashCode(); |
| 5133 |
5 |
result = 31 * result + parameterTypeTokens.hashCode(); |
| 5134 |
5 |
result = 31 * result + ownerTypeToken.hashCode(); |
| 5135 |
5 |
return result; |
| 5136 |
|
} |
| 5137 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5138 |
5 |
@Override... |
| 5139 |
|
public String toString() { |
| 5140 |
5 |
return "TypePool.Default.LazyTypeDescription.GenericTypeToken.ForParameterizedType.Nested{" + |
| 5141 |
|
"name='" + name + '\'' + |
| 5142 |
|
", parameterTypeTokens=" + parameterTypeTokens + |
| 5143 |
|
", ownerTypeToken=" + ownerTypeToken + |
| 5144 |
|
'}'; |
| 5145 |
|
} |
| 5146 |
|
|
| 5147 |
|
|
| 5148 |
|
|
| 5149 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 5 |
Complexity Density: 0.45 |
|
| 5150 |
|
protected static class LazyParameterizedType extends Generic.OfParameterizedType { |
| 5151 |
|
|
| 5152 |
|
|
| 5153 |
|
|
| 5154 |
|
|
| 5155 |
|
private final TypePool typePool; |
| 5156 |
|
|
| 5157 |
|
|
| 5158 |
|
|
| 5159 |
|
|
| 5160 |
|
private final TypeVariableSource typeVariableSource; |
| 5161 |
|
|
| 5162 |
|
|
| 5163 |
|
|
| 5164 |
|
|
| 5165 |
|
private final String typePath; |
| 5166 |
|
|
| 5167 |
|
|
| 5168 |
|
|
| 5169 |
|
|
| 5170 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 5171 |
|
|
| 5172 |
|
|
| 5173 |
|
|
| 5174 |
|
|
| 5175 |
|
private final String name; |
| 5176 |
|
|
| 5177 |
|
|
| 5178 |
|
|
| 5179 |
|
|
| 5180 |
|
private final List<GenericTypeToken> parameterTypeTokens; |
| 5181 |
|
|
| 5182 |
|
|
| 5183 |
|
|
| 5184 |
|
|
| 5185 |
|
private final GenericTypeToken ownerTypeToken; |
| 5186 |
|
|
| 5187 |
|
|
| 5188 |
|
|
| 5189 |
|
|
| 5190 |
|
@param |
| 5191 |
|
@param |
| 5192 |
|
@param |
| 5193 |
|
@param |
| 5194 |
|
@param |
| 5195 |
|
@param |
| 5196 |
|
@param |
| 5197 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 5198 |
98 |
protected LazyParameterizedType(TypePool typePool,... |
| 5199 |
|
TypeVariableSource typeVariableSource, |
| 5200 |
|
String typePath, |
| 5201 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 5202 |
|
String name, |
| 5203 |
|
List<GenericTypeToken> parameterTypeTokens, |
| 5204 |
|
GenericTypeToken ownerTypeToken) { |
| 5205 |
98 |
this.typePool = typePool; |
| 5206 |
98 |
this.typeVariableSource = typeVariableSource; |
| 5207 |
98 |
this.typePath = typePath; |
| 5208 |
98 |
this.annotationTokens = annotationTokens; |
| 5209 |
98 |
this.name = name; |
| 5210 |
98 |
this.parameterTypeTokens = parameterTypeTokens; |
| 5211 |
98 |
this.ownerTypeToken = ownerTypeToken; |
| 5212 |
|
} |
| 5213 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5214 |
48 |
@Override... |
| 5215 |
|
public TypeDescription asErasure() { |
| 5216 |
48 |
return typePool.describe(name).resolve(); |
| 5217 |
|
} |
| 5218 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5219 |
54 |
@Override... |
| 5220 |
|
public TypeList.Generic getTypeArguments() { |
| 5221 |
54 |
return new LazyTokenList(typePool, typeVariableSource, typePath + ownerTypeToken.getTypePathPrefix(), annotationTokens, parameterTypeTokens); |
| 5222 |
|
} |
| 5223 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5224 |
42 |
@Override... |
| 5225 |
|
public Generic getOwnerType() { |
| 5226 |
42 |
return ownerTypeToken.toGenericType(typePool, typeVariableSource, typePath, annotationTokens); |
| 5227 |
|
} |
| 5228 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5229 |
6 |
@Override... |
| 5230 |
|
public AnnotationList getDeclaredAnnotations() { |
| 5231 |
6 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath + ownerTypeToken.getTypePathPrefix())); |
| 5232 |
|
} |
| 5233 |
|
} |
| 5234 |
|
} |
| 5235 |
|
|
| 5236 |
|
|
| 5237 |
|
|
| 5238 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (18) |
Complexity: 6 |
Complexity Density: 0.55 |
|
| 5239 |
|
protected static class LazyParameterizedType extends Generic.OfParameterizedType { |
| 5240 |
|
|
| 5241 |
|
|
| 5242 |
|
|
| 5243 |
|
|
| 5244 |
|
private final TypePool typePool; |
| 5245 |
|
|
| 5246 |
|
|
| 5247 |
|
|
| 5248 |
|
|
| 5249 |
|
private final TypeVariableSource typeVariableSource; |
| 5250 |
|
|
| 5251 |
|
|
| 5252 |
|
|
| 5253 |
|
|
| 5254 |
|
private final String typePath; |
| 5255 |
|
|
| 5256 |
|
|
| 5257 |
|
|
| 5258 |
|
|
| 5259 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 5260 |
|
|
| 5261 |
|
|
| 5262 |
|
|
| 5263 |
|
|
| 5264 |
|
private final String name; |
| 5265 |
|
|
| 5266 |
|
|
| 5267 |
|
|
| 5268 |
|
|
| 5269 |
|
private final List<GenericTypeToken> parameterTypeTokens; |
| 5270 |
|
|
| 5271 |
|
|
| 5272 |
|
|
| 5273 |
|
|
| 5274 |
|
@param |
| 5275 |
|
@param |
| 5276 |
|
@param |
| 5277 |
|
@param |
| 5278 |
|
@param |
| 5279 |
|
@param |
| 5280 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 5281 |
1171 |
protected LazyParameterizedType(TypePool typePool,... |
| 5282 |
|
TypeVariableSource typeVariableSource, |
| 5283 |
|
String typePath, |
| 5284 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 5285 |
|
String name, |
| 5286 |
|
List<GenericTypeToken> parameterTypeTokens) { |
| 5287 |
1171 |
this.typePool = typePool; |
| 5288 |
1171 |
this.typeVariableSource = typeVariableSource; |
| 5289 |
1171 |
this.typePath = typePath; |
| 5290 |
1171 |
this.annotationTokens = annotationTokens; |
| 5291 |
1171 |
this.name = name; |
| 5292 |
1171 |
this.parameterTypeTokens = parameterTypeTokens; |
| 5293 |
|
} |
| 5294 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5295 |
626 |
@Override... |
| 5296 |
|
public TypeDescription asErasure() { |
| 5297 |
626 |
return typePool.describe(name).resolve(); |
| 5298 |
|
} |
| 5299 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5300 |
933 |
@Override... |
| 5301 |
|
public TypeList.Generic getTypeArguments() { |
| 5302 |
933 |
return new LazyTokenList(typePool, typeVariableSource, typePath, annotationTokens, parameterTypeTokens); |
| 5303 |
|
} |
| 5304 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 5305 |
341 |
@Override... |
| 5306 |
|
public Generic getOwnerType() { |
| 5307 |
341 |
TypeDescription ownerType = typePool.describe(name).resolve().getEnclosingType(); |
| 5308 |
341 |
return ownerType == null |
| 5309 |
|
? UNDEFINED |
| 5310 |
|
: ownerType.asGenericType(); |
| 5311 |
|
} |
| 5312 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5313 |
112 |
@Override... |
| 5314 |
|
public AnnotationList getDeclaredAnnotations() { |
| 5315 |
112 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens.get(typePath)); |
| 5316 |
|
} |
| 5317 |
|
} |
| 5318 |
|
} |
| 5319 |
|
|
| 5320 |
|
|
| 5321 |
|
|
| 5322 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.43 |
|
| 5323 |
|
class LazyTokenList extends TypeList.Generic.AbstractBase { |
| 5324 |
|
|
| 5325 |
|
|
| 5326 |
|
|
| 5327 |
|
|
| 5328 |
|
private final TypePool typePool; |
| 5329 |
|
|
| 5330 |
|
|
| 5331 |
|
|
| 5332 |
|
|
| 5333 |
|
private final TypeVariableSource typeVariableSource; |
| 5334 |
|
|
| 5335 |
|
|
| 5336 |
|
|
| 5337 |
|
|
| 5338 |
|
private final String typePath; |
| 5339 |
|
|
| 5340 |
|
|
| 5341 |
|
|
| 5342 |
|
|
| 5343 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 5344 |
|
|
| 5345 |
|
|
| 5346 |
|
|
| 5347 |
|
|
| 5348 |
|
private final List<GenericTypeToken> genericTypeTokens; |
| 5349 |
|
|
| 5350 |
|
|
| 5351 |
|
|
| 5352 |
|
|
| 5353 |
|
@param |
| 5354 |
|
@param |
| 5355 |
|
@param |
| 5356 |
|
@param |
| 5357 |
|
@param |
| 5358 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 5359 |
987 |
protected LazyTokenList(TypePool typePool,... |
| 5360 |
|
TypeVariableSource typeVariableSource, |
| 5361 |
|
String typePath, |
| 5362 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 5363 |
|
List<GenericTypeToken> genericTypeTokens) { |
| 5364 |
987 |
this.typePool = typePool; |
| 5365 |
987 |
this.typeVariableSource = typeVariableSource; |
| 5366 |
987 |
this.typePath = typePath; |
| 5367 |
987 |
this.annotationTokens = annotationTokens; |
| 5368 |
987 |
this.genericTypeTokens = genericTypeTokens; |
| 5369 |
|
} |
| 5370 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5371 |
985 |
@Override... |
| 5372 |
|
public Generic get(int index) { |
| 5373 |
985 |
return genericTypeTokens.get(index).toGenericType(typePool, typeVariableSource, typePath + index + INDEXED_TYPE_DELIMITER, annotationTokens); |
| 5374 |
|
} |
| 5375 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5376 |
1586 |
@Override... |
| 5377 |
|
public int size() { |
| 5378 |
1586 |
return genericTypeTokens.size(); |
| 5379 |
|
} |
| 5380 |
|
|
| 5381 |
|
|
| 5382 |
|
|
| 5383 |
|
|
| |
|
| 85.7% |
Uncovered Elements: 2 (14) |
Complexity: 4 |
Complexity Density: 0.44 |
|
| 5384 |
|
protected static class ForWildcardBound extends TypeList.Generic.AbstractBase { |
| 5385 |
|
|
| 5386 |
|
|
| 5387 |
|
|
| 5388 |
|
|
| 5389 |
|
private final TypePool typePool; |
| 5390 |
|
|
| 5391 |
|
|
| 5392 |
|
|
| 5393 |
|
|
| 5394 |
|
private final TypeVariableSource typeVariableSource; |
| 5395 |
|
|
| 5396 |
|
|
| 5397 |
|
|
| 5398 |
|
|
| 5399 |
|
private final String typePath; |
| 5400 |
|
|
| 5401 |
|
|
| 5402 |
|
|
| 5403 |
|
|
| 5404 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 5405 |
|
|
| 5406 |
|
|
| 5407 |
|
|
| 5408 |
|
|
| 5409 |
|
private final GenericTypeToken genericTypeToken; |
| 5410 |
|
|
| 5411 |
|
|
| 5412 |
|
@param |
| 5413 |
|
@param |
| 5414 |
|
@param |
| 5415 |
|
@param |
| 5416 |
|
@param |
| 5417 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 5418 |
248 |
protected ForWildcardBound(TypePool typePool,... |
| 5419 |
|
TypeVariableSource typeVariableSource, |
| 5420 |
|
String typePath, |
| 5421 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 5422 |
|
GenericTypeToken genericTypeToken) { |
| 5423 |
248 |
this.typePool = typePool; |
| 5424 |
248 |
this.typeVariableSource = typeVariableSource; |
| 5425 |
248 |
this.typePath = typePath; |
| 5426 |
248 |
this.annotationTokens = annotationTokens; |
| 5427 |
248 |
this.genericTypeToken = genericTypeToken; |
| 5428 |
|
} |
| 5429 |
|
|
| |
|
| 60% |
Uncovered Elements: 2 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 5430 |
272 |
@Override... |
| 5431 |
|
public Generic get(int index) { |
| 5432 |
272 |
if (index == 0) { |
| 5433 |
272 |
return genericTypeToken.toGenericType(typePool, typeVariableSource, typePath + WILDCARD_TYPE_PATH, annotationTokens); |
| 5434 |
|
} else { |
| 5435 |
0 |
throw new IndexOutOfBoundsException("index = " + index); |
| 5436 |
|
} |
| 5437 |
|
} |
| 5438 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5439 |
428 |
@Override... |
| 5440 |
|
public int size() { |
| 5441 |
428 |
return 1; |
| 5442 |
|
} |
| 5443 |
|
} |
| 5444 |
|
} |
| 5445 |
|
} |
| 5446 |
|
|
| 5447 |
|
|
| 5448 |
|
|
| 5449 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (29) |
Complexity: 11 |
Complexity Density: 0.69 |
|
| 5450 |
|
protected static class AnnotationToken { |
| 5451 |
|
|
| 5452 |
|
|
| 5453 |
|
|
| 5454 |
|
|
| 5455 |
|
private final String descriptor; |
| 5456 |
|
|
| 5457 |
|
|
| 5458 |
|
|
| 5459 |
|
|
| 5460 |
|
private final Map<String, AnnotationDescription.AnnotationValue<?, ?>> values; |
| 5461 |
|
|
| 5462 |
|
|
| 5463 |
|
|
| 5464 |
|
|
| 5465 |
|
@param |
| 5466 |
|
@param |
| 5467 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 5468 |
23060 |
protected AnnotationToken(String descriptor, Map<String, AnnotationDescription.AnnotationValue<?, ?>> values) {... |
| 5469 |
23060 |
this.descriptor = descriptor; |
| 5470 |
23060 |
this.values = values; |
| 5471 |
|
} |
| 5472 |
|
|
| 5473 |
|
|
| 5474 |
|
|
| 5475 |
|
|
| 5476 |
|
@return |
| 5477 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5478 |
178 |
protected Map<String, AnnotationDescription.AnnotationValue<?, ?>> getValues() {... |
| 5479 |
178 |
return values; |
| 5480 |
|
} |
| 5481 |
|
|
| 5482 |
|
|
| 5483 |
|
|
| 5484 |
|
|
| 5485 |
|
@return |
| 5486 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5487 |
1383 |
protected String getBinaryName() {... |
| 5488 |
1383 |
return descriptor.substring(1, descriptor.length() - 1).replace('/', '.'); |
| 5489 |
|
} |
| 5490 |
|
|
| 5491 |
|
|
| 5492 |
|
|
| 5493 |
|
|
| 5494 |
|
@param |
| 5495 |
|
@return |
| 5496 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 5497 |
1199 |
private Resolution toAnnotationDescription(TypePool typePool) {... |
| 5498 |
1199 |
TypePool.Resolution resolution = typePool.describe(getBinaryName()); |
| 5499 |
1199 |
return resolution.isResolved() |
| 5500 |
|
? new Resolution.Simple(new LazyAnnotationDescription(typePool, resolution.resolve(), values)) |
| 5501 |
|
: new Resolution.Illegal(getBinaryName()); |
| 5502 |
|
} |
| 5503 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 5504 |
6 |
@Override... |
| 5505 |
|
public boolean equals(Object other) { |
| 5506 |
1 |
if (this == other) return true; |
| 5507 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 5508 |
3 |
AnnotationToken that = (AnnotationToken) other; |
| 5509 |
3 |
return descriptor.equals(that.descriptor) |
| 5510 |
|
&& values.equals(that.values); |
| 5511 |
|
} |
| 5512 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 5513 |
4 |
@Override... |
| 5514 |
|
public int hashCode() { |
| 5515 |
4 |
int result = descriptor.hashCode(); |
| 5516 |
4 |
result = 31 * result + values.hashCode(); |
| 5517 |
4 |
return result; |
| 5518 |
|
} |
| 5519 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5520 |
4 |
@Override... |
| 5521 |
|
public String toString() { |
| 5522 |
4 |
return "TypePool.Default.LazyTypeDescription.AnnotationToken{" + |
| 5523 |
|
"descriptor='" + descriptor + '\'' + |
| 5524 |
|
", values=" + values + |
| 5525 |
|
'}'; |
| 5526 |
|
} |
| 5527 |
|
|
| 5528 |
|
|
| 5529 |
|
|
| 5530 |
|
|
| 5531 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 5532 |
|
protected interface Resolution { |
| 5533 |
|
|
| 5534 |
|
|
| 5535 |
|
|
| 5536 |
|
|
| 5537 |
|
@return |
| 5538 |
|
|
| 5539 |
|
boolean isResolved(); |
| 5540 |
|
|
| 5541 |
|
|
| 5542 |
|
|
| 5543 |
|
|
| 5544 |
|
@return |
| 5545 |
|
|
| 5546 |
|
AnnotationDescription resolve(); |
| 5547 |
|
|
| 5548 |
|
|
| 5549 |
|
|
| 5550 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
| 5551 |
|
class Simple implements Resolution { |
| 5552 |
|
|
| 5553 |
|
|
| 5554 |
|
|
| 5555 |
|
|
| 5556 |
|
private final AnnotationDescription annotationDescription; |
| 5557 |
|
|
| 5558 |
|
|
| 5559 |
|
|
| 5560 |
|
|
| 5561 |
|
@param |
| 5562 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5563 |
1196 |
protected Simple(AnnotationDescription annotationDescription) {... |
| 5564 |
1196 |
this.annotationDescription = annotationDescription; |
| 5565 |
|
} |
| 5566 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5567 |
1147 |
@Override... |
| 5568 |
|
public boolean isResolved() { |
| 5569 |
1147 |
return true; |
| 5570 |
|
} |
| 5571 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5572 |
1193 |
@Override... |
| 5573 |
|
public AnnotationDescription resolve() { |
| 5574 |
1193 |
return annotationDescription; |
| 5575 |
|
} |
| 5576 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5577 |
5 |
@Override... |
| 5578 |
|
public boolean equals(Object other) { |
| 5579 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 5580 |
|
&& annotationDescription.equals(((Simple) other).annotationDescription); |
| 5581 |
|
} |
| 5582 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5583 |
3 |
@Override... |
| 5584 |
|
public int hashCode() { |
| 5585 |
3 |
return annotationDescription.hashCode(); |
| 5586 |
|
} |
| 5587 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5588 |
3 |
@Override... |
| 5589 |
|
public String toString() { |
| 5590 |
3 |
return "TypePool.Default.LazyTypeDescription.AnnotationToken.Resolution.Simple{" + |
| 5591 |
|
"annotationDescription=" + annotationDescription + |
| 5592 |
|
'}'; |
| 5593 |
|
} |
| 5594 |
|
} |
| 5595 |
|
|
| 5596 |
|
|
| 5597 |
|
|
| 5598 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 6 |
Complexity Density: 1 |
|
| 5599 |
|
class Illegal implements Resolution { |
| 5600 |
|
|
| 5601 |
|
|
| 5602 |
|
|
| 5603 |
|
|
| 5604 |
|
private final String annotationType; |
| 5605 |
|
|
| 5606 |
|
|
| 5607 |
|
|
| 5608 |
|
|
| 5609 |
|
@param |
| 5610 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5611 |
11 |
public Illegal(String annotationType) {... |
| 5612 |
11 |
this.annotationType = annotationType; |
| 5613 |
|
} |
| 5614 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5615 |
7 |
@Override... |
| 5616 |
|
public boolean isResolved() { |
| 5617 |
7 |
return false; |
| 5618 |
|
} |
| 5619 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5620 |
1 |
@Override... |
| 5621 |
|
public AnnotationDescription resolve() { |
| 5622 |
1 |
throw new IllegalStateException("Annotation type is not available: " + annotationType); |
| 5623 |
|
} |
| 5624 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5625 |
5 |
@Override... |
| 5626 |
|
public boolean equals(Object other) { |
| 5627 |
5 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 5628 |
|
&& annotationType.equals(((Illegal) other).annotationType); |
| 5629 |
|
} |
| 5630 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5631 |
3 |
@Override... |
| 5632 |
|
public int hashCode() { |
| 5633 |
3 |
return annotationType.hashCode(); |
| 5634 |
|
} |
| 5635 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5636 |
3 |
@Override... |
| 5637 |
|
public String toString() { |
| 5638 |
3 |
return "TypePool.Default.LazyTypeDescription.AnnotationToken.Resolution.Illegal{" + |
| 5639 |
|
"annotationType=" + annotationType + |
| 5640 |
|
'}'; |
| 5641 |
|
} |
| 5642 |
|
} |
| 5643 |
|
} |
| 5644 |
|
} |
| 5645 |
|
|
| 5646 |
|
|
| 5647 |
|
|
| 5648 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (30) |
Complexity: 8 |
Complexity Density: 0.38 |
|
| 5649 |
|
protected static class FieldToken { |
| 5650 |
|
|
| 5651 |
|
|
| 5652 |
|
|
| 5653 |
|
|
| 5654 |
|
private final String name; |
| 5655 |
|
|
| 5656 |
|
|
| 5657 |
|
|
| 5658 |
|
|
| 5659 |
|
private final int modifiers; |
| 5660 |
|
|
| 5661 |
|
|
| 5662 |
|
|
| 5663 |
|
|
| 5664 |
|
private final String descriptor; |
| 5665 |
|
|
| 5666 |
|
|
| 5667 |
|
|
| 5668 |
|
|
| 5669 |
|
private final GenericTypeToken.Resolution.ForField signatureResolution; |
| 5670 |
|
|
| 5671 |
|
|
| 5672 |
|
|
| 5673 |
|
|
| 5674 |
|
private final Map<String, List<AnnotationToken>> typeAnnotationTokens; |
| 5675 |
|
|
| 5676 |
|
|
| 5677 |
|
|
| 5678 |
|
|
| 5679 |
|
private final List<AnnotationToken> annotationTokens; |
| 5680 |
|
|
| 5681 |
|
|
| 5682 |
|
|
| 5683 |
|
|
| 5684 |
|
@param |
| 5685 |
|
@param |
| 5686 |
|
@param |
| 5687 |
|
@param |
| 5688 |
|
@param |
| 5689 |
|
@param |
| 5690 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 5691 |
8592 |
protected FieldToken(String name,... |
| 5692 |
|
int modifiers, |
| 5693 |
|
String descriptor, |
| 5694 |
|
GenericTypeToken.Resolution.ForField signatureResolution, |
| 5695 |
|
Map<String, List<AnnotationToken>> typeAnnotationTokens, |
| 5696 |
|
List<AnnotationToken> annotationTokens) { |
| 5697 |
8592 |
this.modifiers = modifiers; |
| 5698 |
8592 |
this.name = name; |
| 5699 |
8592 |
this.descriptor = descriptor; |
| 5700 |
8592 |
this.signatureResolution = signatureResolution; |
| 5701 |
8592 |
this.typeAnnotationTokens = typeAnnotationTokens; |
| 5702 |
8592 |
this.annotationTokens = annotationTokens; |
| 5703 |
|
} |
| 5704 |
|
|
| 5705 |
|
|
| 5706 |
|
|
| 5707 |
|
|
| 5708 |
|
@param |
| 5709 |
|
@return |
| 5710 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5711 |
829 |
private LazyFieldDescription toFieldDescription(LazyTypeDescription lazyTypeDescription) {... |
| 5712 |
829 |
return lazyTypeDescription.new LazyFieldDescription(name, |
| 5713 |
|
modifiers, |
| 5714 |
|
descriptor, |
| 5715 |
|
signatureResolution, |
| 5716 |
|
typeAnnotationTokens, |
| 5717 |
|
annotationTokens); |
| 5718 |
|
} |
| 5719 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 5720 |
10 |
@Override... |
| 5721 |
|
public boolean equals(Object other) { |
| 5722 |
1 |
if (this == other) return true; |
| 5723 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 5724 |
7 |
FieldToken that = (FieldToken) other; |
| 5725 |
7 |
return modifiers == that.modifiers |
| 5726 |
|
&& annotationTokens.equals(that.annotationTokens) |
| 5727 |
|
&& descriptor.equals(that.descriptor) |
| 5728 |
|
&& signatureResolution.equals(that.signatureResolution) |
| 5729 |
|
&& typeAnnotationTokens.equals(that.typeAnnotationTokens) |
| 5730 |
|
&& name.equals(that.name); |
| 5731 |
|
} |
| 5732 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 5733 |
8 |
@Override... |
| 5734 |
|
public int hashCode() { |
| 5735 |
8 |
int result = modifiers; |
| 5736 |
8 |
result = 31 * result + name.hashCode(); |
| 5737 |
8 |
result = 31 * result + descriptor.hashCode(); |
| 5738 |
8 |
result = 31 * result + signatureResolution.hashCode(); |
| 5739 |
8 |
result = 31 * result + typeAnnotationTokens.hashCode(); |
| 5740 |
8 |
result = 31 * result + annotationTokens.hashCode(); |
| 5741 |
8 |
return result; |
| 5742 |
|
} |
| 5743 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5744 |
8 |
@Override... |
| 5745 |
|
public String toString() { |
| 5746 |
8 |
return "TypePool.Default.LazyTypeDescription.FieldToken{" + |
| 5747 |
|
"modifiers=" + modifiers + |
| 5748 |
|
", name='" + name + '\'' + |
| 5749 |
|
", descriptor='" + descriptor + '\'' + |
| 5750 |
|
", signatureResolution=" + signatureResolution + |
| 5751 |
|
", typeAnnotationTokens=" + typeAnnotationTokens + |
| 5752 |
|
", annotationTokens=" + annotationTokens + |
| 5753 |
|
'}'; |
| 5754 |
|
} |
| 5755 |
|
} |
| 5756 |
|
|
| 5757 |
|
|
| 5758 |
|
|
| 5759 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (48) |
Complexity: 8 |
Complexity Density: 0.21 |
|
| 5760 |
|
protected static class MethodToken { |
| 5761 |
|
|
| 5762 |
|
|
| 5763 |
|
|
| 5764 |
|
|
| 5765 |
|
private final String name; |
| 5766 |
|
|
| 5767 |
|
|
| 5768 |
|
|
| 5769 |
|
|
| 5770 |
|
private final int modifiers; |
| 5771 |
|
|
| 5772 |
|
|
| 5773 |
|
|
| 5774 |
|
|
| 5775 |
|
private final String descriptor; |
| 5776 |
|
|
| 5777 |
|
|
| 5778 |
|
|
| 5779 |
|
|
| 5780 |
|
private final GenericTypeToken.Resolution.ForMethod signatureResolution; |
| 5781 |
|
|
| 5782 |
|
|
| 5783 |
|
|
| 5784 |
|
|
| 5785 |
|
|
| 5786 |
|
private final String[] exceptionName; |
| 5787 |
|
|
| 5788 |
|
|
| 5789 |
|
|
| 5790 |
|
|
| 5791 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> typeVariableAnnotationTokens; |
| 5792 |
|
|
| 5793 |
|
|
| 5794 |
|
|
| 5795 |
|
|
| 5796 |
|
private final Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> typeVariableBoundAnnotationTokens; |
| 5797 |
|
|
| 5798 |
|
|
| 5799 |
|
|
| 5800 |
|
|
| 5801 |
|
private final Map<String, List<AnnotationToken>> returnTypeAnnotationTokens; |
| 5802 |
|
|
| 5803 |
|
|
| 5804 |
|
|
| 5805 |
|
|
| 5806 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> parameterTypeAnnotationTokens; |
| 5807 |
|
|
| 5808 |
|
|
| 5809 |
|
|
| 5810 |
|
|
| 5811 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> exceptionTypeAnnotationTokens; |
| 5812 |
|
|
| 5813 |
|
|
| 5814 |
|
|
| 5815 |
|
|
| 5816 |
|
private final Map<String, List<AnnotationToken>> receiverTypeAnnotationTokens; |
| 5817 |
|
|
| 5818 |
|
|
| 5819 |
|
|
| 5820 |
|
|
| 5821 |
|
private final List<AnnotationToken> annotationTokens; |
| 5822 |
|
|
| 5823 |
|
|
| 5824 |
|
|
| 5825 |
|
|
| 5826 |
|
private final Map<Integer, List<AnnotationToken>> parameterAnnotationTokens; |
| 5827 |
|
|
| 5828 |
|
|
| 5829 |
|
|
| 5830 |
|
|
| 5831 |
|
private final List<ParameterToken> parameterTokens; |
| 5832 |
|
|
| 5833 |
|
|
| 5834 |
|
|
| 5835 |
|
|
| 5836 |
|
private final AnnotationDescription.AnnotationValue<?, ?> defaultValue; |
| 5837 |
|
|
| 5838 |
|
|
| 5839 |
|
|
| 5840 |
|
|
| 5841 |
|
@param |
| 5842 |
|
@param |
| 5843 |
|
@param |
| 5844 |
|
@param |
| 5845 |
|
@param |
| 5846 |
|
|
| 5847 |
|
@param |
| 5848 |
|
@param |
| 5849 |
|
|
| 5850 |
|
@param |
| 5851 |
|
@param |
| 5852 |
|
@param |
| 5853 |
|
@param |
| 5854 |
|
@param |
| 5855 |
|
@param |
| 5856 |
|
@param |
| 5857 |
|
@param |
| 5858 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (15) |
Complexity: 1 |
Complexity Density: 0.07 |
|
| 5859 |
105222 |
protected MethodToken(String name,... |
| 5860 |
|
int modifiers, |
| 5861 |
|
String descriptor, |
| 5862 |
|
GenericTypeToken.Resolution.ForMethod signatureResolution, |
| 5863 |
|
String[] exceptionName, |
| 5864 |
|
Map<Integer, Map<String, List<AnnotationToken>>> typeVariableAnnotationTokens, |
| 5865 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> typeVariableBoundAnnotationTokens, |
| 5866 |
|
Map<String, List<AnnotationToken>> returnTypeAnnotationTokens, |
| 5867 |
|
Map<Integer, Map<String, List<AnnotationToken>>> parameterTypeAnnotationTokens, |
| 5868 |
|
Map<Integer, Map<String, List<AnnotationToken>>> exceptionTypeAnnotationTokens, |
| 5869 |
|
Map<String, List<AnnotationToken>> receiverTypeAnnotationTokens, |
| 5870 |
|
List<AnnotationToken> annotationTokens, |
| 5871 |
|
Map<Integer, List<AnnotationToken>> parameterAnnotationTokens, |
| 5872 |
|
List<ParameterToken> parameterTokens, |
| 5873 |
|
AnnotationDescription.AnnotationValue<?, ?> defaultValue) { |
| 5874 |
105222 |
this.modifiers = modifiers; |
| 5875 |
105222 |
this.name = name; |
| 5876 |
105222 |
this.descriptor = descriptor; |
| 5877 |
105222 |
this.signatureResolution = signatureResolution; |
| 5878 |
105222 |
this.exceptionName = exceptionName; |
| 5879 |
105222 |
this.typeVariableAnnotationTokens = typeVariableAnnotationTokens; |
| 5880 |
105222 |
this.typeVariableBoundAnnotationTokens = typeVariableBoundAnnotationTokens; |
| 5881 |
105222 |
this.returnTypeAnnotationTokens = returnTypeAnnotationTokens; |
| 5882 |
105222 |
this.parameterTypeAnnotationTokens = parameterTypeAnnotationTokens; |
| 5883 |
105222 |
this.exceptionTypeAnnotationTokens = exceptionTypeAnnotationTokens; |
| 5884 |
105222 |
this.receiverTypeAnnotationTokens = receiverTypeAnnotationTokens; |
| 5885 |
105222 |
this.annotationTokens = annotationTokens; |
| 5886 |
105222 |
this.parameterAnnotationTokens = parameterAnnotationTokens; |
| 5887 |
105222 |
this.parameterTokens = parameterTokens; |
| 5888 |
105222 |
this.defaultValue = defaultValue; |
| 5889 |
|
} |
| 5890 |
|
|
| 5891 |
|
|
| 5892 |
|
|
| 5893 |
|
|
| 5894 |
|
@param |
| 5895 |
|
@return |
| 5896 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5897 |
14863 |
private MethodDescription.InDefinedShape toMethodDescription(LazyTypeDescription lazyTypeDescription) {... |
| 5898 |
14863 |
return lazyTypeDescription.new LazyMethodDescription(name, |
| 5899 |
|
modifiers, |
| 5900 |
|
descriptor, |
| 5901 |
|
signatureResolution, |
| 5902 |
|
exceptionName, |
| 5903 |
|
typeVariableAnnotationTokens, |
| 5904 |
|
typeVariableBoundAnnotationTokens, |
| 5905 |
|
returnTypeAnnotationTokens, |
| 5906 |
|
parameterTypeAnnotationTokens, |
| 5907 |
|
exceptionTypeAnnotationTokens, |
| 5908 |
|
receiverTypeAnnotationTokens, |
| 5909 |
|
annotationTokens, |
| 5910 |
|
parameterAnnotationTokens, |
| 5911 |
|
parameterTokens, |
| 5912 |
|
defaultValue); |
| 5913 |
|
} |
| 5914 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 5915 |
19 |
@Override... |
| 5916 |
|
public boolean equals(Object other) { |
| 5917 |
1 |
if (this == other) return true; |
| 5918 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 5919 |
16 |
MethodToken that = (MethodToken) other; |
| 5920 |
16 |
return modifiers == that.modifiers |
| 5921 |
|
&& typeVariableAnnotationTokens.equals(that.typeVariableAnnotationTokens) |
| 5922 |
|
&& typeVariableBoundAnnotationTokens.equals(that.typeVariableBoundAnnotationTokens) |
| 5923 |
|
&& returnTypeAnnotationTokens.equals(that.returnTypeAnnotationTokens) |
| 5924 |
|
&& parameterTypeAnnotationTokens.equals(that.parameterTypeAnnotationTokens) |
| 5925 |
|
&& exceptionTypeAnnotationTokens.equals(that.exceptionTypeAnnotationTokens) |
| 5926 |
|
&& receiverTypeAnnotationTokens.equals(that.receiverTypeAnnotationTokens) |
| 5927 |
|
&& annotationTokens.equals(that.annotationTokens) |
| 5928 |
|
&& defaultValue.equals(that.defaultValue) |
| 5929 |
|
&& descriptor.equals(that.descriptor) |
| 5930 |
|
&& parameterTokens.equals(that.parameterTokens) |
| 5931 |
|
&& signatureResolution.equals(that.signatureResolution) |
| 5932 |
|
&& Arrays.equals(exceptionName, that.exceptionName) |
| 5933 |
|
&& name.equals(that.name) |
| 5934 |
|
&& parameterAnnotationTokens.equals(that.parameterAnnotationTokens); |
| 5935 |
|
} |
| 5936 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 1 |
Complexity Density: 0.06 |
|
| 5937 |
17 |
@Override... |
| 5938 |
|
public int hashCode() { |
| 5939 |
17 |
int result = modifiers; |
| 5940 |
17 |
result = 31 * result + name.hashCode(); |
| 5941 |
17 |
result = 31 * result + descriptor.hashCode(); |
| 5942 |
17 |
result = 31 * result + signatureResolution.hashCode(); |
| 5943 |
17 |
result = 31 * result + Arrays.hashCode(exceptionName); |
| 5944 |
17 |
result = 31 * result + typeVariableAnnotationTokens.hashCode(); |
| 5945 |
17 |
result = 31 * result + typeVariableBoundAnnotationTokens.hashCode(); |
| 5946 |
17 |
result = 31 * result + returnTypeAnnotationTokens.hashCode(); |
| 5947 |
17 |
result = 31 * result + parameterTypeAnnotationTokens.hashCode(); |
| 5948 |
17 |
result = 31 * result + exceptionTypeAnnotationTokens.hashCode(); |
| 5949 |
17 |
result = 31 * result + receiverTypeAnnotationTokens.hashCode(); |
| 5950 |
17 |
result = 31 * result + annotationTokens.hashCode(); |
| 5951 |
17 |
result = 31 * result + parameterAnnotationTokens.hashCode(); |
| 5952 |
17 |
result = 31 * result + parameterTokens.hashCode(); |
| 5953 |
17 |
result = 31 * result + defaultValue.hashCode(); |
| 5954 |
17 |
return result; |
| 5955 |
|
} |
| 5956 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 5957 |
17 |
@Override... |
| 5958 |
|
public String toString() { |
| 5959 |
17 |
return "TypePool.Default.LazyTypeDescription.MethodToken{" + |
| 5960 |
|
"modifiers=" + modifiers + |
| 5961 |
|
", name='" + name + '\'' + |
| 5962 |
|
", descriptor='" + descriptor + '\'' + |
| 5963 |
|
", signatureResolution=" + signatureResolution + |
| 5964 |
|
", exceptionName=" + Arrays.toString(exceptionName) + |
| 5965 |
|
", typeVariableAnnotationTokens=" + typeVariableAnnotationTokens + |
| 5966 |
|
", typeVariableBoundAnnotationTokens=" + typeVariableBoundAnnotationTokens + |
| 5967 |
|
", returnTypeAnnotationTokens=" + returnTypeAnnotationTokens + |
| 5968 |
|
", parameterTypeAnnotationTokens=" + parameterTypeAnnotationTokens + |
| 5969 |
|
", exceptionTypeAnnotationTokens=" + exceptionTypeAnnotationTokens + |
| 5970 |
|
", receiverTypeAnnotationTokens=" + receiverTypeAnnotationTokens + |
| 5971 |
|
", annotationTokens=" + annotationTokens + |
| 5972 |
|
", parameterAnnotationTokens=" + parameterAnnotationTokens + |
| 5973 |
|
", parameterTokens=" + parameterTokens + |
| 5974 |
|
", defaultValue=" + defaultValue + |
| 5975 |
|
'}'; |
| 5976 |
|
} |
| 5977 |
|
|
| 5978 |
|
|
| 5979 |
|
|
| 5980 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (36) |
Complexity: 15 |
Complexity Density: 0.94 |
|
| 5981 |
|
protected static class ParameterToken { |
| 5982 |
|
|
| 5983 |
|
|
| 5984 |
|
|
| 5985 |
|
|
| 5986 |
|
protected static final String NO_NAME = null; |
| 5987 |
|
|
| 5988 |
|
|
| 5989 |
|
|
| 5990 |
|
|
| 5991 |
|
protected static final Integer NO_MODIFIERS = null; |
| 5992 |
|
|
| 5993 |
|
|
| 5994 |
|
|
| 5995 |
|
|
| 5996 |
|
private final String name; |
| 5997 |
|
|
| 5998 |
|
|
| 5999 |
|
|
| 6000 |
|
|
| 6001 |
|
private final Integer modifiers; |
| 6002 |
|
|
| 6003 |
|
|
| 6004 |
|
|
| 6005 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6006 |
100980 |
protected ParameterToken() {... |
| 6007 |
100980 |
this(NO_NAME); |
| 6008 |
|
} |
| 6009 |
|
|
| 6010 |
|
|
| 6011 |
|
|
| 6012 |
|
|
| 6013 |
|
@param |
| 6014 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6015 |
103003 |
protected ParameterToken(String name) {... |
| 6016 |
103003 |
this(name, NO_MODIFIERS); |
| 6017 |
|
} |
| 6018 |
|
|
| 6019 |
|
|
| 6020 |
|
|
| 6021 |
|
|
| 6022 |
|
@param |
| 6023 |
|
@param |
| 6024 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 6025 |
103215 |
protected ParameterToken(String name, Integer modifiers) {... |
| 6026 |
103215 |
this.name = name; |
| 6027 |
103215 |
this.modifiers = modifiers; |
| 6028 |
|
} |
| 6029 |
|
|
| 6030 |
|
|
| 6031 |
|
|
| 6032 |
|
|
| 6033 |
|
@return |
| 6034 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6035 |
2396 |
protected String getName() {... |
| 6036 |
2396 |
return name; |
| 6037 |
|
} |
| 6038 |
|
|
| 6039 |
|
|
| 6040 |
|
|
| 6041 |
|
|
| 6042 |
|
@return |
| 6043 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6044 |
2396 |
protected Integer getModifiers() {... |
| 6045 |
2396 |
return modifiers; |
| 6046 |
|
} |
| 6047 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 6 |
Complexity Density: 1 |
|
| 6048 |
15 |
@Override... |
| 6049 |
|
public boolean equals(Object other) { |
| 6050 |
3 |
if (this == other) return true; |
| 6051 |
6 |
if (other == null || getClass() != other.getClass()) return false; |
| 6052 |
6 |
ParameterToken that = ((ParameterToken) other); |
| 6053 |
6 |
return !(modifiers != null ? !modifiers.equals(that.modifiers) : that.modifiers != null) |
| 6054 |
5 |
&& !(name != null ? !name.equals(that.name) : that.name != null); |
| 6055 |
|
} |
| 6056 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 3 |
Complexity Density: 1 |
|
| 6057 |
9 |
@Override... |
| 6058 |
|
public int hashCode() { |
| 6059 |
9 |
int result = name != null ? name.hashCode() : 0; |
| 6060 |
9 |
result = 31 * result + (modifiers != null ? modifiers.hashCode() : 0); |
| 6061 |
9 |
return result; |
| 6062 |
|
} |
| 6063 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6064 |
12 |
@Override... |
| 6065 |
|
public String toString() { |
| 6066 |
12 |
return "TypePool.Default.LazyTypeDescription.MethodToken.ParameterToken{" + |
| 6067 |
|
"name='" + name + '\'' + |
| 6068 |
|
", modifiers=" + modifiers + |
| 6069 |
|
'}'; |
| 6070 |
|
} |
| 6071 |
|
} |
| 6072 |
|
} |
| 6073 |
|
|
| 6074 |
|
|
| 6075 |
|
|
| 6076 |
|
|
| |
|
| 94.9% |
Uncovered Elements: 2 (39) |
Complexity: 12 |
Complexity Density: 0.57 |
|
| 6077 |
|
private static class LazyAnnotationDescription extends AnnotationDescription.AbstractBase { |
| 6078 |
|
|
| 6079 |
|
|
| 6080 |
|
|
| 6081 |
|
|
| 6082 |
|
protected final TypePool typePool; |
| 6083 |
|
|
| 6084 |
|
|
| 6085 |
|
|
| 6086 |
|
|
| 6087 |
|
private final TypeDescription annotationType; |
| 6088 |
|
|
| 6089 |
|
|
| 6090 |
|
|
| 6091 |
|
|
| 6092 |
|
protected final Map<String, AnnotationValue<?, ?>> values; |
| 6093 |
|
|
| 6094 |
|
|
| 6095 |
|
|
| 6096 |
|
|
| 6097 |
|
@param |
| 6098 |
|
@param |
| 6099 |
|
@param |
| 6100 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 6101 |
1805 |
private LazyAnnotationDescription(TypePool typePool, TypeDescription annotationType, Map<String, AnnotationValue<?, ?>> values) {... |
| 6102 |
1805 |
this.typePool = typePool; |
| 6103 |
1805 |
this.annotationType = annotationType; |
| 6104 |
1805 |
this.values = values; |
| 6105 |
|
} |
| 6106 |
|
|
| 6107 |
|
|
| 6108 |
|
|
| 6109 |
|
|
| 6110 |
|
|
| 6111 |
|
|
| 6112 |
|
@param |
| 6113 |
|
@param |
| 6114 |
|
@return |
| 6115 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 6116 |
1561 |
protected static AnnotationList asListOfNullable(TypePool typePool, List<? extends AnnotationToken> tokens) {... |
| 6117 |
1561 |
return tokens == null |
| 6118 |
|
? new AnnotationList.Empty() |
| 6119 |
|
: asList(typePool, tokens); |
| 6120 |
|
} |
| 6121 |
|
|
| 6122 |
|
|
| 6123 |
|
|
| 6124 |
|
|
| 6125 |
|
|
| 6126 |
|
@param |
| 6127 |
|
@param |
| 6128 |
|
@return |
| 6129 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 2 |
Complexity Density: 0.33 |
|
| 6130 |
1690 |
protected static AnnotationList asList(TypePool typePool, List<? extends AnnotationToken> tokens) {... |
| 6131 |
1690 |
List<AnnotationDescription> annotationDescriptions = new ArrayList<AnnotationDescription>(tokens.size()); |
| 6132 |
1690 |
for (AnnotationToken token : tokens) { |
| 6133 |
1153 |
AnnotationToken.Resolution resolution = token.toAnnotationDescription(typePool); |
| 6134 |
1153 |
if (resolution.isResolved()) { |
| 6135 |
1147 |
annotationDescriptions.add(resolution.resolve()); |
| 6136 |
|
} |
| 6137 |
|
} |
| 6138 |
1690 |
return new AnnotationList.Explicit(annotationDescriptions); |
| 6139 |
|
} |
| 6140 |
|
|
| |
|
| 84.6% |
Uncovered Elements: 2 (13) |
Complexity: 4 |
Complexity Density: 0.57 |
|
| 6141 |
850 |
@Override... |
| 6142 |
|
public Object getValue(MethodDescription.InDefinedShape methodDescription) { |
| 6143 |
850 |
if (!methodDescription.getDeclaringType().asErasure().equals(annotationType)) { |
| 6144 |
1 |
throw new IllegalArgumentException(methodDescription + " is not declared by " + getAnnotationType()); |
| 6145 |
|
} |
| 6146 |
849 |
AnnotationValue<?, ?> annotationValue = values.get(methodDescription.getName()); |
| 6147 |
849 |
Object value = annotationValue == null |
| 6148 |
|
? getAnnotationType().getDeclaredMethods().filter(is(methodDescription)).getOnly().getDefaultValue() |
| 6149 |
|
: annotationValue.resolve(); |
| 6150 |
849 |
if (value == null) { |
| 6151 |
0 |
throw new IllegalStateException(methodDescription + " is not defined on annotation"); |
| 6152 |
|
} |
| 6153 |
849 |
return PropertyDispatcher.of(value.getClass()).conditionalClone(value); |
| 6154 |
|
} |
| 6155 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6156 |
1363 |
@Override... |
| 6157 |
|
public TypeDescription getAnnotationType() { |
| 6158 |
1363 |
return annotationType; |
| 6159 |
|
} |
| 6160 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 6161 |
613 |
@Override... |
| 6162 |
|
public <T extends Annotation> Loadable<T> prepare(Class<T> annotationType) { |
| 6163 |
613 |
if (!this.annotationType.represents(annotationType)) { |
| 6164 |
1 |
throw new IllegalArgumentException(annotationType + " does not represent " + this.annotationType); |
| 6165 |
|
} |
| 6166 |
612 |
return new Loadable<T>(typePool, annotationType, values); |
| 6167 |
|
} |
| 6168 |
|
|
| 6169 |
|
|
| 6170 |
|
|
| 6171 |
|
|
| 6172 |
|
@param |
| 6173 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 5 (15) |
Complexity: 7 |
Complexity Density: 0.7 |
|
| 6174 |
|
private static class Loadable<S extends Annotation> extends LazyAnnotationDescription implements AnnotationDescription.Loadable<S> { |
| 6175 |
|
|
| 6176 |
|
|
| 6177 |
|
|
| 6178 |
|
|
| 6179 |
|
private final Class<S> annotationType; |
| 6180 |
|
|
| 6181 |
|
|
| 6182 |
|
|
| 6183 |
|
|
| 6184 |
|
@param |
| 6185 |
|
@param |
| 6186 |
|
@param |
| 6187 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 6188 |
612 |
private Loadable(TypePool typePool, Class<S> annotationType, Map<String, AnnotationValue<?, ?>> values) {... |
| 6189 |
612 |
super(typePool, new ForLoadedType(annotationType), values); |
| 6190 |
612 |
this.annotationType = annotationType; |
| 6191 |
|
} |
| 6192 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6193 |
116 |
@Override... |
| 6194 |
|
public S load() throws ClassNotFoundException { |
| 6195 |
116 |
return load(annotationType.getClassLoader()); |
| 6196 |
|
} |
| 6197 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6198 |
116 |
@Override... |
| 6199 |
|
@SuppressWarnings("unchecked") |
| 6200 |
|
public S load(ClassLoader classLoader) throws ClassNotFoundException { |
| 6201 |
116 |
return (S) Proxy.newProxyInstance(classLoader, |
| 6202 |
|
new Class<?>[]{annotationType}, |
| 6203 |
|
AnnotationInvocationHandler.of(classLoader, annotationType, values)); |
| 6204 |
|
} |
| 6205 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 6206 |
2 |
@Override... |
| 6207 |
|
public S loadSilent() { |
| 6208 |
2 |
try { |
| 6209 |
2 |
return load(); |
| 6210 |
|
} catch (ClassNotFoundException exception) { |
| 6211 |
0 |
throw new IllegalStateException(ForLoadedAnnotation.ERROR_MESSAGE, exception); |
| 6212 |
|
} |
| 6213 |
|
} |
| 6214 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 6215 |
0 |
@Override... |
| 6216 |
|
public S loadSilent(ClassLoader classLoader) { |
| 6217 |
0 |
try { |
| 6218 |
0 |
return load(classLoader); |
| 6219 |
|
} catch (ClassNotFoundException exception) { |
| 6220 |
0 |
throw new IllegalStateException(ForLoadedAnnotation.ERROR_MESSAGE, exception); |
| 6221 |
|
} |
| 6222 |
|
} |
| 6223 |
|
} |
| 6224 |
|
} |
| 6225 |
|
|
| 6226 |
|
|
| 6227 |
|
@link |
| 6228 |
|
|
| 6229 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.8 |
|
| 6230 |
|
private static class LazyPackageDescription extends PackageDescription.AbstractBase { |
| 6231 |
|
|
| 6232 |
|
|
| 6233 |
|
|
| 6234 |
|
|
| 6235 |
|
private final TypePool typePool; |
| 6236 |
|
|
| 6237 |
|
|
| 6238 |
|
|
| 6239 |
|
|
| 6240 |
|
private final String name; |
| 6241 |
|
|
| 6242 |
|
|
| 6243 |
|
|
| 6244 |
|
|
| 6245 |
|
@param |
| 6246 |
|
@param |
| 6247 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 6248 |
81 |
private LazyPackageDescription(TypePool typePool, String name) {... |
| 6249 |
81 |
this.typePool = typePool; |
| 6250 |
81 |
this.name = name; |
| 6251 |
|
} |
| 6252 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 6253 |
2 |
@Override... |
| 6254 |
|
public AnnotationList getDeclaredAnnotations() { |
| 6255 |
2 |
Resolution resolution = typePool.describe(name + "." + PackageDescription.PACKAGE_CLASS_NAME); |
| 6256 |
2 |
return resolution.isResolved() |
| 6257 |
|
? resolution.resolve().getDeclaredAnnotations() |
| 6258 |
|
: new AnnotationList.Empty(); |
| 6259 |
|
} |
| 6260 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6261 |
79 |
@Override... |
| 6262 |
|
public String getName() { |
| 6263 |
79 |
return name; |
| 6264 |
|
} |
| 6265 |
|
} |
| 6266 |
|
|
| 6267 |
|
|
| 6268 |
|
@link |
| 6269 |
|
|
| |
|
| 60% |
Uncovered Elements: 8 (20) |
Complexity: 6 |
Complexity Density: 0.46 |
|
| 6270 |
|
private static class LazyTypeList extends TypeList.AbstractBase { |
| 6271 |
|
|
| 6272 |
|
|
| 6273 |
|
|
| 6274 |
|
|
| 6275 |
|
private final TypePool typePool; |
| 6276 |
|
|
| 6277 |
|
|
| 6278 |
|
|
| 6279 |
|
|
| 6280 |
|
private final List<String> descriptors; |
| 6281 |
|
|
| 6282 |
|
|
| 6283 |
|
|
| 6284 |
|
|
| 6285 |
|
@param |
| 6286 |
|
@param |
| 6287 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 6288 |
1564 |
private LazyTypeList(TypePool typePool, List<String> descriptors) {... |
| 6289 |
1564 |
this.typePool = typePool; |
| 6290 |
1564 |
this.descriptors = descriptors; |
| 6291 |
|
} |
| 6292 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6293 |
1488 |
@Override... |
| 6294 |
|
public TypeDescription get(int index) { |
| 6295 |
1488 |
return TokenizedGenericType.toErasure(typePool, descriptors.get(index)); |
| 6296 |
|
} |
| 6297 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6298 |
5279 |
@Override... |
| 6299 |
|
public int size() { |
| 6300 |
5279 |
return descriptors.size(); |
| 6301 |
|
} |
| 6302 |
|
|
| |
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
| 6303 |
0 |
@Override... |
| 6304 |
|
public String[] toInternalNames() { |
| 6305 |
0 |
String[] internalName = new String[descriptors.size()]; |
| 6306 |
0 |
int index = 0; |
| 6307 |
0 |
for (String descriptor : descriptors) { |
| 6308 |
0 |
internalName[index++] = Type.getType(descriptor).getInternalName(); |
| 6309 |
|
} |
| 6310 |
0 |
return internalName.length == 0 |
| 6311 |
|
? NO_INTERFACES |
| 6312 |
|
: internalName; |
| 6313 |
|
} |
| 6314 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 6315 |
1 |
@Override... |
| 6316 |
|
public int getStackSize() { |
| 6317 |
1 |
int stackSize = 0; |
| 6318 |
1 |
for (String descriptor : descriptors) { |
| 6319 |
2 |
stackSize += Type.getType(descriptor).getSize(); |
| 6320 |
|
} |
| 6321 |
1 |
return stackSize; |
| 6322 |
|
} |
| 6323 |
|
} |
| 6324 |
|
|
| 6325 |
|
|
| 6326 |
|
@link |
| 6327 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (21) |
Complexity: 8 |
Complexity Density: 0.73 |
|
| 6328 |
|
private static class TokenizedGenericType extends Generic.LazyProjection { |
| 6329 |
|
|
| 6330 |
|
|
| 6331 |
|
|
| 6332 |
|
|
| 6333 |
|
private final TypePool typePool; |
| 6334 |
|
|
| 6335 |
|
|
| 6336 |
|
|
| 6337 |
|
|
| 6338 |
|
private final GenericTypeToken genericTypeToken; |
| 6339 |
|
|
| 6340 |
|
|
| 6341 |
|
|
| 6342 |
|
|
| 6343 |
|
private final String rawTypeDescriptor; |
| 6344 |
|
|
| 6345 |
|
|
| 6346 |
|
|
| 6347 |
|
|
| 6348 |
|
private final Map<String, List<AnnotationToken>> annotationTokens; |
| 6349 |
|
|
| 6350 |
|
|
| 6351 |
|
|
| 6352 |
|
|
| 6353 |
|
private final TypeVariableSource typeVariableSource; |
| 6354 |
|
|
| 6355 |
|
|
| 6356 |
|
|
| 6357 |
|
|
| 6358 |
|
@param |
| 6359 |
|
@param |
| 6360 |
|
@param |
| 6361 |
|
@param |
| 6362 |
|
@param |
| 6363 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 6364 |
1204 |
protected TokenizedGenericType(TypePool typePool,... |
| 6365 |
|
GenericTypeToken genericTypeToken, |
| 6366 |
|
String rawTypeDescriptor, |
| 6367 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 6368 |
|
TypeVariableSource typeVariableSource) { |
| 6369 |
1204 |
this.typePool = typePool; |
| 6370 |
1204 |
this.genericTypeToken = genericTypeToken; |
| 6371 |
1204 |
this.rawTypeDescriptor = rawTypeDescriptor; |
| 6372 |
1204 |
this.annotationTokens = annotationTokens; |
| 6373 |
1204 |
this.typeVariableSource = typeVariableSource; |
| 6374 |
|
} |
| 6375 |
|
|
| 6376 |
|
|
| 6377 |
|
|
| 6378 |
|
|
| 6379 |
|
@param |
| 6380 |
|
@param |
| 6381 |
|
@param |
| 6382 |
|
@param |
| 6383 |
|
@param |
| 6384 |
|
@return |
| 6385 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 6386 |
1204 |
protected static Generic of(TypePool typePool,... |
| 6387 |
|
GenericTypeToken genericTypeToken, |
| 6388 |
|
String rawTypeDescriptor, |
| 6389 |
|
Map<String, List<AnnotationToken>> annotationTokens, |
| 6390 |
|
TypeVariableSource typeVariableSource) { |
| 6391 |
1204 |
return new TokenizedGenericType(typePool, |
| 6392 |
|
genericTypeToken, |
| 6393 |
|
rawTypeDescriptor, |
| 6394 |
1204 |
annotationTokens == null |
| 6395 |
|
? Collections.<String, List<AnnotationToken>>emptyMap() |
| 6396 |
|
: annotationTokens, |
| 6397 |
|
typeVariableSource); |
| 6398 |
|
} |
| 6399 |
|
|
| 6400 |
|
|
| 6401 |
|
|
| 6402 |
|
|
| 6403 |
|
@param |
| 6404 |
|
@param |
| 6405 |
|
@return |
| 6406 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 6407 |
4467 |
protected static TypeDescription toErasure(TypePool typePool, String descriptor) {... |
| 6408 |
4467 |
Type type = Type.getType(descriptor); |
| 6409 |
4467 |
return typePool.describe(type.getSort() == Type.ARRAY |
| 6410 |
|
? type.getInternalName().replace('/', '.') |
| 6411 |
|
: type.getClassName()).resolve(); |
| 6412 |
|
} |
| 6413 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6414 |
1585 |
@Override... |
| 6415 |
|
protected Generic resolve() { |
| 6416 |
1585 |
return genericTypeToken.toGenericType(typePool, typeVariableSource, GenericTypeToken.EMPTY_TYPE_PATH, annotationTokens); |
| 6417 |
|
} |
| 6418 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6419 |
510 |
@Override... |
| 6420 |
|
public TypeDescription asErasure() { |
| 6421 |
510 |
return toErasure(typePool, rawTypeDescriptor); |
| 6422 |
|
} |
| 6423 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6424 |
62 |
@Override... |
| 6425 |
|
public AnnotationList getDeclaredAnnotations() { |
| 6426 |
62 |
return resolve().getDeclaredAnnotations(); |
| 6427 |
|
} |
| 6428 |
|
|
| 6429 |
|
|
| 6430 |
|
|
| 6431 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 5 |
Complexity Density: 0.62 |
|
| 6432 |
|
protected static class TokenList extends TypeList.Generic.AbstractBase { |
| 6433 |
|
|
| 6434 |
|
|
| 6435 |
|
|
| 6436 |
|
|
| 6437 |
|
private final TypePool typePool; |
| 6438 |
|
|
| 6439 |
|
|
| 6440 |
|
|
| 6441 |
|
|
| 6442 |
|
private final List<GenericTypeToken> genericTypeTokens; |
| 6443 |
|
|
| 6444 |
|
|
| 6445 |
|
|
| 6446 |
|
|
| 6447 |
|
private final List<String> rawTypeDescriptors; |
| 6448 |
|
|
| 6449 |
|
|
| 6450 |
|
|
| 6451 |
|
|
| 6452 |
|
private final TypeVariableSource typeVariableSource; |
| 6453 |
|
|
| 6454 |
|
|
| 6455 |
|
|
| 6456 |
|
|
| 6457 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens; |
| 6458 |
|
|
| 6459 |
|
|
| 6460 |
|
|
| 6461 |
|
|
| 6462 |
|
@param |
| 6463 |
|
@param |
| 6464 |
|
@param |
| 6465 |
|
@param |
| 6466 |
|
@param |
| 6467 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 6468 |
588 |
private TokenList(TypePool typePool,... |
| 6469 |
|
List<GenericTypeToken> genericTypeTokens, |
| 6470 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 6471 |
|
List<String> rawTypeDescriptors, |
| 6472 |
|
TypeVariableSource typeVariableSource) { |
| 6473 |
588 |
this.typePool = typePool; |
| 6474 |
588 |
this.genericTypeTokens = genericTypeTokens; |
| 6475 |
588 |
this.annotationTokens = annotationTokens; |
| 6476 |
588 |
this.rawTypeDescriptors = rawTypeDescriptors; |
| 6477 |
588 |
this.typeVariableSource = typeVariableSource; |
| 6478 |
|
} |
| 6479 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 6480 |
248 |
@Override... |
| 6481 |
|
public Generic get(int index) { |
| 6482 |
248 |
return rawTypeDescriptors.size() == genericTypeTokens.size() |
| 6483 |
|
? TokenizedGenericType.of(typePool, genericTypeTokens.get(index), rawTypeDescriptors.get(index), annotationTokens.get(index), typeVariableSource) |
| 6484 |
|
: TokenizedGenericType.toErasure(typePool, rawTypeDescriptors.get(index)).asGenericType(); |
| 6485 |
|
} |
| 6486 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6487 |
147 |
@Override... |
| 6488 |
|
public int size() { |
| 6489 |
147 |
return rawTypeDescriptors.size(); |
| 6490 |
|
} |
| 6491 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6492 |
322 |
@Override... |
| 6493 |
|
public TypeList asErasures() { |
| 6494 |
322 |
return new LazyTypeList(typePool, rawTypeDescriptors); |
| 6495 |
|
} |
| 6496 |
|
} |
| 6497 |
|
|
| 6498 |
|
|
| 6499 |
|
|
| 6500 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 3 |
Complexity Density: 0.43 |
|
| 6501 |
|
protected static class TypeVariableList extends TypeList.Generic.AbstractBase { |
| 6502 |
|
|
| 6503 |
|
|
| 6504 |
|
|
| 6505 |
|
|
| 6506 |
|
private final TypePool typePool; |
| 6507 |
|
|
| 6508 |
|
|
| 6509 |
|
|
| 6510 |
|
|
| 6511 |
|
private final List<GenericTypeToken.OfFormalTypeVariable> typeVariables; |
| 6512 |
|
|
| 6513 |
|
|
| 6514 |
|
|
| 6515 |
|
|
| 6516 |
|
private final TypeVariableSource typeVariableSource; |
| 6517 |
|
|
| 6518 |
|
|
| 6519 |
|
|
| 6520 |
|
|
| 6521 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens; |
| 6522 |
|
|
| 6523 |
|
|
| 6524 |
|
|
| 6525 |
|
|
| 6526 |
|
private final Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens; |
| 6527 |
|
|
| 6528 |
|
|
| 6529 |
|
|
| 6530 |
|
|
| 6531 |
|
@param |
| 6532 |
|
@param |
| 6533 |
|
@param |
| 6534 |
|
@param |
| 6535 |
|
@param |
| 6536 |
|
|
| 6537 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 6538 |
1603 |
protected TypeVariableList(TypePool typePool,... |
| 6539 |
|
List<GenericTypeToken.OfFormalTypeVariable> typeVariables, |
| 6540 |
|
TypeVariableSource typeVariableSource, |
| 6541 |
|
Map<Integer, Map<String, List<AnnotationToken>>> annotationTokens, |
| 6542 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> boundAnnotationTokens) { |
| 6543 |
1603 |
this.typePool = typePool; |
| 6544 |
1603 |
this.typeVariables = typeVariables; |
| 6545 |
1603 |
this.typeVariableSource = typeVariableSource; |
| 6546 |
1603 |
this.annotationTokens = annotationTokens; |
| 6547 |
1603 |
this.boundAnnotationTokens = boundAnnotationTokens; |
| 6548 |
|
} |
| 6549 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6550 |
2544 |
@Override... |
| 6551 |
|
public Generic get(int index) { |
| 6552 |
2544 |
return typeVariables.get(index).toGenericType(typePool, typeVariableSource, annotationTokens.get(index), boundAnnotationTokens.get(index)); |
| 6553 |
|
} |
| 6554 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6555 |
7695 |
@Override... |
| 6556 |
|
public int size() { |
| 6557 |
7695 |
return typeVariables.size(); |
| 6558 |
|
} |
| 6559 |
|
} |
| 6560 |
|
|
| 6561 |
|
|
| 6562 |
|
|
| 6563 |
|
|
| |
|
| 55.6% |
Uncovered Elements: 4 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
| 6564 |
|
protected static class Malformed extends LazyProjection { |
| 6565 |
|
|
| 6566 |
|
|
| 6567 |
|
|
| 6568 |
|
|
| 6569 |
|
private final TypePool typePool; |
| 6570 |
|
|
| 6571 |
|
|
| 6572 |
|
|
| 6573 |
|
|
| 6574 |
|
private final String rawTypeDescriptor; |
| 6575 |
|
|
| 6576 |
|
|
| 6577 |
|
|
| 6578 |
|
|
| 6579 |
|
@param |
| 6580 |
|
@param |
| 6581 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 6582 |
6 |
protected Malformed(TypePool typePool, String rawTypeDescriptor) {... |
| 6583 |
6 |
this.typePool = typePool; |
| 6584 |
6 |
this.rawTypeDescriptor = rawTypeDescriptor; |
| 6585 |
|
} |
| 6586 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6587 |
6 |
@Override... |
| 6588 |
|
protected Generic resolve() { |
| 6589 |
6 |
throw new GenericSignatureFormatError(); |
| 6590 |
|
} |
| 6591 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6592 |
0 |
@Override... |
| 6593 |
|
public TypeDescription asErasure() { |
| 6594 |
0 |
return toErasure(typePool, rawTypeDescriptor); |
| 6595 |
|
} |
| 6596 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6597 |
0 |
@Override... |
| 6598 |
|
public AnnotationList getDeclaredAnnotations() { |
| 6599 |
0 |
throw new GenericSignatureFormatError(); |
| 6600 |
|
} |
| 6601 |
|
|
| 6602 |
|
|
| 6603 |
|
|
| 6604 |
|
|
| |
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 4 |
Complexity Density: 0.8 |
|
| 6605 |
|
protected static class TokenList extends TypeList.Generic.AbstractBase { |
| 6606 |
|
|
| 6607 |
|
|
| 6608 |
|
|
| 6609 |
|
|
| 6610 |
|
private final TypePool typePool; |
| 6611 |
|
|
| 6612 |
|
|
| 6613 |
|
|
| 6614 |
|
|
| 6615 |
|
private final List<String> rawTypeDescriptors; |
| 6616 |
|
|
| 6617 |
|
|
| 6618 |
|
|
| 6619 |
|
|
| 6620 |
|
@param |
| 6621 |
|
@param |
| 6622 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 6623 |
4 |
protected TokenList(TypePool typePool, List<String> rawTypeDescriptors) {... |
| 6624 |
4 |
this.typePool = typePool; |
| 6625 |
4 |
this.rawTypeDescriptors = rawTypeDescriptors; |
| 6626 |
|
} |
| 6627 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6628 |
2 |
@Override... |
| 6629 |
|
public Generic get(int index) { |
| 6630 |
2 |
return new Malformed(typePool, rawTypeDescriptors.get(index)); |
| 6631 |
|
} |
| 6632 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6633 |
4 |
@Override... |
| 6634 |
|
public int size() { |
| 6635 |
4 |
return rawTypeDescriptors.size(); |
| 6636 |
|
} |
| 6637 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6638 |
0 |
@Override... |
| 6639 |
|
public TypeList asErasures() { |
| 6640 |
0 |
return new LazyTypeList(typePool, rawTypeDescriptors); |
| 6641 |
|
} |
| 6642 |
|
} |
| 6643 |
|
|
| 6644 |
|
} |
| 6645 |
|
} |
| 6646 |
|
|
| 6647 |
|
|
| 6648 |
|
|
| 6649 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (17) |
Complexity: 6 |
Complexity Density: 0.55 |
|
| 6650 |
|
private class LazyFieldDescription extends FieldDescription.InDefinedShape.AbstractBase { |
| 6651 |
|
|
| 6652 |
|
|
| 6653 |
|
|
| 6654 |
|
|
| 6655 |
|
private final String name; |
| 6656 |
|
|
| 6657 |
|
|
| 6658 |
|
|
| 6659 |
|
|
| 6660 |
|
private final int modifiers; |
| 6661 |
|
|
| 6662 |
|
|
| 6663 |
|
|
| 6664 |
|
|
| 6665 |
|
private final String descriptor; |
| 6666 |
|
|
| 6667 |
|
|
| 6668 |
|
|
| 6669 |
|
|
| 6670 |
|
private final GenericTypeToken.Resolution.ForField signatureResolution; |
| 6671 |
|
|
| 6672 |
|
|
| 6673 |
|
|
| 6674 |
|
|
| 6675 |
|
private final Map<String, List<AnnotationToken>> typeAnnotationTokens; |
| 6676 |
|
|
| 6677 |
|
|
| 6678 |
|
|
| 6679 |
|
|
| 6680 |
|
private final List<AnnotationToken> annotationTokens; |
| 6681 |
|
|
| 6682 |
|
|
| 6683 |
|
|
| 6684 |
|
|
| 6685 |
|
@param |
| 6686 |
|
@param |
| 6687 |
|
@param |
| 6688 |
|
@param |
| 6689 |
|
@param |
| 6690 |
|
@param |
| 6691 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
|
| 6692 |
829 |
private LazyFieldDescription(String name,... |
| 6693 |
|
int modifiers, |
| 6694 |
|
String descriptor, |
| 6695 |
|
GenericTypeToken.Resolution.ForField signatureResolution, |
| 6696 |
|
Map<String, List<AnnotationToken>> typeAnnotationTokens, |
| 6697 |
|
List<AnnotationToken> annotationTokens) { |
| 6698 |
829 |
this.modifiers = modifiers & ~Opcodes.ACC_DEPRECATED; |
| 6699 |
829 |
this.name = name; |
| 6700 |
829 |
this.descriptor = descriptor; |
| 6701 |
829 |
this.signatureResolution = signatureResolution; |
| 6702 |
829 |
this.typeAnnotationTokens = typeAnnotationTokens; |
| 6703 |
829 |
this.annotationTokens = annotationTokens; |
| 6704 |
|
} |
| 6705 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6706 |
300 |
@Override... |
| 6707 |
|
public Generic getType() { |
| 6708 |
300 |
return signatureResolution.resolveFieldType(descriptor, typePool, typeAnnotationTokens, this); |
| 6709 |
|
} |
| 6710 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6711 |
47 |
@Override... |
| 6712 |
|
public AnnotationList getDeclaredAnnotations() { |
| 6713 |
47 |
return LazyAnnotationDescription.asListOfNullable(typePool, annotationTokens); |
| 6714 |
|
} |
| 6715 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6716 |
628 |
@Override... |
| 6717 |
|
public String getName() { |
| 6718 |
628 |
return name; |
| 6719 |
|
} |
| 6720 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6721 |
551 |
@Override... |
| 6722 |
|
public TypeDescription getDeclaringType() { |
| 6723 |
551 |
return LazyTypeDescription.this; |
| 6724 |
|
} |
| 6725 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6726 |
89 |
@Override... |
| 6727 |
|
public int getModifiers() { |
| 6728 |
89 |
return modifiers; |
| 6729 |
|
} |
| 6730 |
|
} |
| 6731 |
|
|
| 6732 |
|
|
| 6733 |
|
|
| 6734 |
|
|
| |
|
| 97.4% |
Uncovered Elements: 2 (78) |
Complexity: 21 |
Complexity Density: 0.43 |
|
| 6735 |
|
private class LazyMethodDescription extends MethodDescription.InDefinedShape.AbstractBase { |
| 6736 |
|
|
| 6737 |
|
|
| 6738 |
|
|
| 6739 |
|
|
| 6740 |
|
private final String internalName; |
| 6741 |
|
|
| 6742 |
|
|
| 6743 |
|
|
| 6744 |
|
|
| 6745 |
|
private final int modifiers; |
| 6746 |
|
|
| 6747 |
|
|
| 6748 |
|
|
| 6749 |
|
|
| 6750 |
|
private final String returnTypeDescriptor; |
| 6751 |
|
|
| 6752 |
|
|
| 6753 |
|
|
| 6754 |
|
|
| 6755 |
|
private final GenericTypeToken.Resolution.ForMethod signatureResolution; |
| 6756 |
|
|
| 6757 |
|
|
| 6758 |
|
|
| 6759 |
|
|
| 6760 |
|
private final List<String> parameterTypeDescriptors; |
| 6761 |
|
|
| 6762 |
|
|
| 6763 |
|
|
| 6764 |
|
|
| 6765 |
|
private final List<String> exceptionTypeDescriptors; |
| 6766 |
|
|
| 6767 |
|
|
| 6768 |
|
|
| 6769 |
|
|
| 6770 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> typeVariableAnnotationTokens; |
| 6771 |
|
|
| 6772 |
|
|
| 6773 |
|
|
| 6774 |
|
|
| 6775 |
|
private final Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> typeVariableBoundAnnotationTokens; |
| 6776 |
|
|
| 6777 |
|
|
| 6778 |
|
|
| 6779 |
|
|
| 6780 |
|
private final Map<String, List<AnnotationToken>> returnTypeAnnotationTokens; |
| 6781 |
|
|
| 6782 |
|
|
| 6783 |
|
|
| 6784 |
|
|
| 6785 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> parameterTypeAnnotationTokens; |
| 6786 |
|
|
| 6787 |
|
|
| 6788 |
|
|
| 6789 |
|
|
| 6790 |
|
private final Map<Integer, Map<String, List<AnnotationToken>>> exceptionTypeAnnotationTokens; |
| 6791 |
|
|
| 6792 |
|
|
| 6793 |
|
|
| 6794 |
|
|
| 6795 |
|
private final Map<String, List<AnnotationToken>> receiverTypeAnnotationTokens; |
| 6796 |
|
|
| 6797 |
|
|
| 6798 |
|
|
| 6799 |
|
|
| 6800 |
|
private final List<AnnotationToken> annotationTokens; |
| 6801 |
|
|
| 6802 |
|
|
| 6803 |
|
|
| 6804 |
|
|
| 6805 |
|
|
| 6806 |
|
private final Map<Integer, List<AnnotationToken>> parameterAnnotationTokens; |
| 6807 |
|
|
| 6808 |
|
|
| 6809 |
|
|
| 6810 |
|
|
| 6811 |
|
private final String[] parameterNames; |
| 6812 |
|
|
| 6813 |
|
|
| 6814 |
|
|
| 6815 |
|
|
| 6816 |
|
private final Integer[] parameterModifiers; |
| 6817 |
|
|
| 6818 |
|
|
| 6819 |
|
|
| 6820 |
|
|
| 6821 |
|
private final AnnotationDescription.AnnotationValue<?, ?> defaultValue; |
| 6822 |
|
|
| 6823 |
|
|
| 6824 |
|
|
| 6825 |
|
|
| 6826 |
|
@param |
| 6827 |
|
@param |
| 6828 |
|
@param |
| 6829 |
|
@param |
| 6830 |
|
@param |
| 6831 |
|
|
| 6832 |
|
|
| 6833 |
|
@param |
| 6834 |
|
@param |
| 6835 |
|
|
| 6836 |
|
@param |
| 6837 |
|
@param |
| 6838 |
|
@param |
| 6839 |
|
@param |
| 6840 |
|
@param |
| 6841 |
|
@param |
| 6842 |
|
|
| 6843 |
|
@param |
| 6844 |
|
|
| 6845 |
|
|
| 6846 |
|
@param |
| 6847 |
|
|
| |
|
| 97.2% |
Uncovered Elements: 1 (36) |
Complexity: 3 |
Complexity Density: 0.09 |
|
| 6848 |
14863 |
@SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "To be removed once type annotations are in place")... |
| 6849 |
|
private LazyMethodDescription(String internalName, |
| 6850 |
|
int modifiers, |
| 6851 |
|
String methodDescriptor, |
| 6852 |
|
GenericTypeToken.Resolution.ForMethod signatureResolution, |
| 6853 |
|
String[] exceptionTypeInternalName, |
| 6854 |
|
Map<Integer, Map<String, List<AnnotationToken>>> typeVariableAnnotationTokens, |
| 6855 |
|
Map<Integer, Map<Integer, Map<String, List<AnnotationToken>>>> typeVariableBoundAnnotationTokens, |
| 6856 |
|
Map<String, List<AnnotationToken>> returnTypeAnnotationTokens, |
| 6857 |
|
Map<Integer, Map<String, List<AnnotationToken>>> parameterTypeAnnotationTokens, |
| 6858 |
|
Map<Integer, Map<String, List<AnnotationToken>>> exceptionTypeAnnotationTokens, |
| 6859 |
|
Map<String, List<AnnotationToken>> receiverTypeAnnotationTokens, |
| 6860 |
|
List<AnnotationToken> annotationTokens, |
| 6861 |
|
Map<Integer, List<AnnotationToken>> parameterAnnotationTokens, |
| 6862 |
|
List<MethodToken.ParameterToken> parameterTokens, |
| 6863 |
|
AnnotationDescription.AnnotationValue<?, ?> defaultValue) { |
| 6864 |
14863 |
this.modifiers = modifiers & ~Opcodes.ACC_DEPRECATED; |
| 6865 |
14863 |
this.internalName = internalName; |
| 6866 |
14863 |
Type methodType = Type.getMethodType(methodDescriptor); |
| 6867 |
14863 |
Type returnType = methodType.getReturnType(); |
| 6868 |
14863 |
Type[] parameterType = methodType.getArgumentTypes(); |
| 6869 |
14863 |
returnTypeDescriptor = returnType.getDescriptor(); |
| 6870 |
14863 |
parameterTypeDescriptors = new ArrayList<String>(parameterType.length); |
| 6871 |
14863 |
for (Type type : parameterType) { |
| 6872 |
2384 |
parameterTypeDescriptors.add(type.getDescriptor()); |
| 6873 |
|
} |
| 6874 |
14863 |
this.signatureResolution = signatureResolution; |
| 6875 |
14863 |
if (exceptionTypeInternalName == null) { |
| 6876 |
13387 |
exceptionTypeDescriptors = Collections.emptyList(); |
| 6877 |
|
} else { |
| 6878 |
1476 |
exceptionTypeDescriptors = new ArrayList<String>(exceptionTypeInternalName.length); |
| 6879 |
1476 |
for (String anExceptionTypeInternalName : exceptionTypeInternalName) { |
| 6880 |
1774 |
exceptionTypeDescriptors.add(Type.getObjectType(anExceptionTypeInternalName).getDescriptor()); |
| 6881 |
|
} |
| 6882 |
|
} |
| 6883 |
14863 |
this.typeVariableAnnotationTokens = typeVariableAnnotationTokens; |
| 6884 |
14863 |
this.typeVariableBoundAnnotationTokens = typeVariableBoundAnnotationTokens; |
| 6885 |
14863 |
this.returnTypeAnnotationTokens = returnTypeAnnotationTokens; |
| 6886 |
14863 |
this.parameterTypeAnnotationTokens = parameterTypeAnnotationTokens; |
| 6887 |
14863 |
this.exceptionTypeAnnotationTokens = exceptionTypeAnnotationTokens; |
| 6888 |
14863 |
this.receiverTypeAnnotationTokens = receiverTypeAnnotationTokens; |
| 6889 |
14863 |
this.annotationTokens = annotationTokens; |
| 6890 |
14863 |
this.parameterAnnotationTokens = parameterAnnotationTokens; |
| 6891 |
14863 |
parameterNames = new String[parameterType.length]; |
| 6892 |
14863 |
parameterModifiers = new Integer[parameterType.length]; |
| 6893 |
14863 |
if (parameterTokens.size() == parameterType.length) { |
| 6894 |
14863 |
int index = 0; |
| 6895 |
14863 |
for (MethodToken.ParameterToken parameterToken : parameterTokens) { |
| 6896 |
2384 |
parameterNames[index] = parameterToken.getName(); |
| 6897 |
2384 |
parameterModifiers[index] = parameterToken.getModifiers(); |
| 6898 |
2384 |
index++; |
| 6899 |
|
} |
| 6900 |
|
} |
| 6901 |
14863 |
this.defaultValue = defaultValue; |
| 6902 |
|
} |
| 6903 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6904 |
2349 |
@Override... |
| 6905 |
|
public Generic getReturnType() { |
| 6906 |
2349 |
return signatureResolution.resolveReturnType(returnTypeDescriptor, typePool, returnTypeAnnotationTokens, this); |
| 6907 |
|
} |
| 6908 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6909 |
463 |
@Override... |
| 6910 |
|
public TypeList.Generic getExceptionTypes() { |
| 6911 |
463 |
return signatureResolution.resolveExceptionTypes(exceptionTypeDescriptors, typePool, exceptionTypeAnnotationTokens, this); |
| 6912 |
|
} |
| 6913 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6914 |
1914 |
@Override... |
| 6915 |
|
public ParameterList<ParameterDescription.InDefinedShape> getParameters() { |
| 6916 |
1914 |
return new LazyParameterList(); |
| 6917 |
|
} |
| 6918 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6919 |
435 |
@Override... |
| 6920 |
|
public AnnotationList getDeclaredAnnotations() { |
| 6921 |
435 |
return LazyAnnotationDescription.asList(typePool, annotationTokens); |
| 6922 |
|
} |
| 6923 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6924 |
64790 |
@Override... |
| 6925 |
|
public String getInternalName() { |
| 6926 |
64790 |
return internalName; |
| 6927 |
|
} |
| 6928 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6929 |
1420 |
@Override... |
| 6930 |
|
public TypeDescription getDeclaringType() { |
| 6931 |
1420 |
return LazyTypeDescription.this; |
| 6932 |
|
} |
| 6933 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6934 |
2172 |
@Override... |
| 6935 |
|
public int getModifiers() { |
| 6936 |
2172 |
return modifiers; |
| 6937 |
|
} |
| 6938 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6939 |
1042 |
@Override... |
| 6940 |
|
public TypeList.Generic getTypeVariables() { |
| 6941 |
1042 |
return signatureResolution.resolveTypeVariables(typePool, this, typeVariableAnnotationTokens, typeVariableBoundAnnotationTokens); |
| 6942 |
|
} |
| 6943 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 6944 |
466 |
@Override... |
| 6945 |
|
public Object getDefaultValue() { |
| 6946 |
466 |
return defaultValue == null |
| 6947 |
|
? NO_DEFAULT_VALUE |
| 6948 |
|
: defaultValue.resolve(); |
| 6949 |
|
} |
| 6950 |
|
|
| |
|
| 95% |
Uncovered Elements: 1 (20) |
Complexity: 8 |
Complexity Density: 1 |
|
| 6951 |
452 |
@Override... |
| 6952 |
|
public Generic getReceiverType() { |
| 6953 |
452 |
if (isStatic()) { |
| 6954 |
33 |
return Generic.UNDEFINED; |
| 6955 |
419 |
} else if (isConstructor()) { |
| 6956 |
174 |
TypeDescription declaringType = getDeclaringType(), enclosingDeclaringType = declaringType.getEnclosingType(); |
| 6957 |
174 |
if (enclosingDeclaringType == null) { |
| 6958 |
70 |
return declaringType.isGenericDeclaration() |
| 6959 |
|
? new LazyParameterizedReceiverType(declaringType) |
| 6960 |
|
: new LazyNonGenericReceiverType(declaringType); |
| 6961 |
|
} else { |
| 6962 |
104 |
return !declaringType.isStatic() && declaringType.isGenericDeclaration() |
| 6963 |
|
? new LazyParameterizedReceiverType(enclosingDeclaringType) |
| 6964 |
|
: new LazyNonGenericReceiverType(enclosingDeclaringType); |
| 6965 |
|
} |
| 6966 |
|
} else { |
| 6967 |
245 |
return LazyTypeDescription.this.isGenericDeclaration() |
| 6968 |
|
? new LazyParameterizedReceiverType() |
| 6969 |
|
: new LazyNonGenericReceiverType(); |
| 6970 |
|
} |
| 6971 |
|
} |
| 6972 |
|
|
| 6973 |
|
|
| 6974 |
|
|
| 6975 |
|
|
| |
|
| 40% |
Uncovered Elements: 9 (15) |
Complexity: 7 |
Complexity Density: 1 |
|
| 6976 |
|
private class LazyParameterList extends ParameterList.AbstractBase<ParameterDescription.InDefinedShape> { |
| 6977 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6978 |
443 |
@Override... |
| 6979 |
|
public ParameterDescription.InDefinedShape get(int index) { |
| 6980 |
443 |
return new LazyParameterDescription(index); |
| 6981 |
|
} |
| 6982 |
|
|
| |
|
| 0% |
Uncovered Elements: 8 (8) |
Complexity: 4 |
Complexity Density: 1 |
|
| 6983 |
0 |
@Override... |
| 6984 |
|
public boolean hasExplicitMetaData() { |
| 6985 |
0 |
for (int i = 0; i < size(); i++) { |
| 6986 |
0 |
if (parameterNames[i] == null || parameterModifiers[i] == null) { |
| 6987 |
0 |
return false; |
| 6988 |
|
} |
| 6989 |
|
} |
| 6990 |
0 |
return true; |
| 6991 |
|
} |
| 6992 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6993 |
1966 |
@Override... |
| 6994 |
|
public int size() { |
| 6995 |
1966 |
return parameterTypeDescriptors.size(); |
| 6996 |
|
} |
| 6997 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 6998 |
977 |
@Override... |
| 6999 |
|
public TypeList.Generic asTypeList() { |
| 7000 |
977 |
return signatureResolution.resolveParameterTypes(parameterTypeDescriptors, typePool, parameterTypeAnnotationTokens, LazyMethodDescription.this); |
| 7001 |
|
} |
| 7002 |
|
} |
| 7003 |
|
|
| 7004 |
|
|
| 7005 |
|
|
| 7006 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (22) |
Complexity: 11 |
Complexity Density: 1.22 |
|
| 7007 |
|
private class LazyParameterDescription extends ParameterDescription.InDefinedShape.AbstractBase { |
| 7008 |
|
|
| 7009 |
|
|
| 7010 |
|
|
| 7011 |
|
|
| 7012 |
|
private final int index; |
| 7013 |
|
|
| 7014 |
|
|
| 7015 |
|
|
| 7016 |
|
|
| 7017 |
|
@param |
| 7018 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7019 |
443 |
protected LazyParameterDescription(int index) {... |
| 7020 |
443 |
this.index = index; |
| 7021 |
|
} |
| 7022 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7023 |
18 |
@Override... |
| 7024 |
|
public MethodDescription.InDefinedShape getDeclaringMethod() { |
| 7025 |
18 |
return LazyMethodDescription.this; |
| 7026 |
|
} |
| 7027 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7028 |
21 |
@Override... |
| 7029 |
|
public int getIndex() { |
| 7030 |
21 |
return index; |
| 7031 |
|
} |
| 7032 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7033 |
184 |
@Override... |
| 7034 |
|
public boolean isNamed() { |
| 7035 |
184 |
return parameterNames[index] != null; |
| 7036 |
|
} |
| 7037 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7038 |
177 |
@Override... |
| 7039 |
|
public boolean hasModifiers() { |
| 7040 |
177 |
return parameterModifiers[index] != null; |
| 7041 |
|
} |
| 7042 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 7043 |
40 |
@Override... |
| 7044 |
|
public String getName() { |
| 7045 |
40 |
return isNamed() |
| 7046 |
|
? parameterNames[index] |
| 7047 |
|
: super.getName(); |
| 7048 |
|
} |
| 7049 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 7050 |
44 |
@Override... |
| 7051 |
|
public int getModifiers() { |
| 7052 |
44 |
return hasModifiers() |
| 7053 |
|
? parameterModifiers[index] |
| 7054 |
|
: super.getModifiers(); |
| 7055 |
|
} |
| 7056 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7057 |
378 |
@Override... |
| 7058 |
|
public Generic getType() { |
| 7059 |
378 |
return signatureResolution.resolveParameterTypes(parameterTypeDescriptors, typePool, parameterTypeAnnotationTokens, LazyMethodDescription.this).get(index); |
| 7060 |
|
} |
| 7061 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7062 |
140 |
@Override... |
| 7063 |
|
public AnnotationList getDeclaredAnnotations() { |
| 7064 |
140 |
return LazyAnnotationDescription.asListOfNullable(typePool, parameterAnnotationTokens.get(index)); |
| 7065 |
|
} |
| 7066 |
|
} |
| 7067 |
|
|
| 7068 |
|
|
| 7069 |
|
|
| 7070 |
|
|
| |
|
| 92.3% |
Uncovered Elements: 2 (26) |
Complexity: 11 |
Complexity Density: 0.85 |
|
| 7071 |
|
private class LazyParameterizedReceiverType extends Generic.OfParameterizedType { |
| 7072 |
|
|
| 7073 |
|
|
| 7074 |
|
|
| 7075 |
|
|
| 7076 |
|
private final TypeDescription typeDescription; |
| 7077 |
|
|
| 7078 |
|
|
| 7079 |
|
|
| 7080 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7081 |
6 |
protected LazyParameterizedReceiverType() {... |
| 7082 |
6 |
this(LazyTypeDescription.this); |
| 7083 |
|
} |
| 7084 |
|
|
| 7085 |
|
|
| 7086 |
|
|
| 7087 |
|
|
| 7088 |
|
@param |
| 7089 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7090 |
32 |
protected LazyParameterizedReceiverType(TypeDescription typeDescription) {... |
| 7091 |
32 |
this.typeDescription = typeDescription; |
| 7092 |
|
} |
| 7093 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7094 |
46 |
@Override... |
| 7095 |
|
public TypeList.Generic getTypeArguments() { |
| 7096 |
46 |
return new TypeArgumentList(typeDescription.getTypeVariables()); |
| 7097 |
|
} |
| 7098 |
|
|
| |
|
| 75% |
Uncovered Elements: 2 (8) |
Complexity: 4 |
Complexity Density: 1 |
|
| 7099 |
40 |
@Override... |
| 7100 |
|
public Generic getOwnerType() { |
| 7101 |
40 |
TypeDescription declaringType = typeDescription.getDeclaringType(); |
| 7102 |
40 |
if (declaringType == null) { |
| 7103 |
0 |
return UNDEFINED; |
| 7104 |
|
} else { |
| 7105 |
40 |
return !typeDescription.isStatic() && declaringType.isGenericDeclaration() |
| 7106 |
|
? new LazyParameterizedReceiverType(declaringType) |
| 7107 |
|
: new LazyNonGenericReceiverType(declaringType); |
| 7108 |
|
} |
| 7109 |
|
} |
| 7110 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7111 |
30 |
@Override... |
| 7112 |
|
public AnnotationList getDeclaredAnnotations() { |
| 7113 |
30 |
return LazyAnnotationDescription.asListOfNullable(typePool, receiverTypeAnnotationTokens.get(getTypePath())); |
| 7114 |
|
} |
| 7115 |
|
|
| 7116 |
|
|
| 7117 |
|
|
| 7118 |
|
|
| 7119 |
|
@return |
| 7120 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 7121 |
60 |
private String getTypePath() {... |
| 7122 |
60 |
StringBuilder typePath = new StringBuilder(); |
| 7123 |
72 |
for (int index = 0; index < typeDescription.getSegmentCount(); index++) { |
| 7124 |
12 |
typePath = typePath.append(GenericTypeToken.INNER_CLASS_PATH); |
| 7125 |
|
} |
| 7126 |
60 |
return typePath.toString(); |
| 7127 |
|
} |
| 7128 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7129 |
10 |
@Override... |
| 7130 |
|
public TypeDescription asErasure() { |
| 7131 |
10 |
return typeDescription; |
| 7132 |
|
} |
| 7133 |
|
|
| 7134 |
|
|
| 7135 |
|
|
| 7136 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 3 |
Complexity Density: 1 |
|
| 7137 |
|
protected class TypeArgumentList extends TypeList.Generic.AbstractBase { |
| 7138 |
|
|
| 7139 |
|
|
| 7140 |
|
|
| 7141 |
|
|
| 7142 |
|
private final List<? extends Generic> typeVariables; |
| 7143 |
|
|
| 7144 |
|
|
| 7145 |
|
|
| 7146 |
|
|
| 7147 |
|
@param |
| 7148 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7149 |
46 |
protected TypeArgumentList(List<? extends Generic> typeVariables) {... |
| 7150 |
46 |
this.typeVariables = typeVariables; |
| 7151 |
|
} |
| 7152 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7153 |
46 |
@Override... |
| 7154 |
|
public Generic get(int index) { |
| 7155 |
46 |
return new AnnotatedTypeVariable(typeVariables.get(index), index); |
| 7156 |
|
} |
| 7157 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7158 |
46 |
@Override... |
| 7159 |
|
public int size() { |
| 7160 |
46 |
return typeVariables.size(); |
| 7161 |
|
} |
| 7162 |
|
|
| 7163 |
|
|
| 7164 |
|
|
| 7165 |
|
|
| |
|
| 63.6% |
Uncovered Elements: 4 (11) |
Complexity: 5 |
Complexity Density: 0.83 |
|
| 7166 |
|
protected class AnnotatedTypeVariable extends OfTypeVariable { |
| 7167 |
|
|
| 7168 |
|
|
| 7169 |
|
|
| 7170 |
|
|
| 7171 |
|
private final Generic typeVariable; |
| 7172 |
|
|
| 7173 |
|
|
| 7174 |
|
|
| 7175 |
|
|
| 7176 |
|
private final int index; |
| 7177 |
|
|
| 7178 |
|
|
| 7179 |
|
|
| 7180 |
|
|
| 7181 |
|
@param |
| 7182 |
|
@param |
| 7183 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 7184 |
46 |
protected AnnotatedTypeVariable(Generic typeVariable, int index) {... |
| 7185 |
46 |
this.typeVariable = typeVariable; |
| 7186 |
46 |
this.index = index; |
| 7187 |
|
} |
| 7188 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7189 |
0 |
@Override... |
| 7190 |
|
public TypeList.Generic getUpperBounds() { |
| 7191 |
0 |
return typeVariable.getUpperBounds(); |
| 7192 |
|
} |
| 7193 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7194 |
0 |
@Override... |
| 7195 |
|
public TypeVariableSource getVariableSource() { |
| 7196 |
0 |
return typeVariable.getVariableSource(); |
| 7197 |
|
} |
| 7198 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7199 |
8 |
@Override... |
| 7200 |
|
public String getSymbol() { |
| 7201 |
8 |
return typeVariable.getSymbol(); |
| 7202 |
|
} |
| 7203 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7204 |
30 |
@Override... |
| 7205 |
|
public AnnotationList getDeclaredAnnotations() { |
| 7206 |
30 |
return LazyAnnotationDescription.asListOfNullable(typePool, receiverTypeAnnotationTokens.get(getTypePath() |
| 7207 |
|
+ index |
| 7208 |
|
+ GenericTypeToken.INDEXED_TYPE_DELIMITER)); |
| 7209 |
|
} |
| 7210 |
|
} |
| 7211 |
|
} |
| 7212 |
|
} |
| 7213 |
|
|
| 7214 |
|
|
| 7215 |
|
|
| 7216 |
|
|
| |
|
| 90% |
Uncovered Elements: 2 (20) |
Complexity: 8 |
Complexity Density: 0.8 |
|
| 7217 |
|
protected class LazyNonGenericReceiverType extends Generic.OfNonGenericType { |
| 7218 |
|
|
| 7219 |
|
|
| 7220 |
|
|
| 7221 |
|
|
| 7222 |
|
private final TypeDescription typeDescription; |
| 7223 |
|
|
| 7224 |
|
|
| 7225 |
|
|
| 7226 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7227 |
239 |
protected LazyNonGenericReceiverType() {... |
| 7228 |
239 |
this(LazyTypeDescription.this); |
| 7229 |
|
} |
| 7230 |
|
|
| 7231 |
|
|
| 7232 |
|
|
| 7233 |
|
|
| 7234 |
|
@param |
| 7235 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7236 |
571 |
protected LazyNonGenericReceiverType(TypeDescription typeDescription) {... |
| 7237 |
571 |
this.typeDescription = typeDescription; |
| 7238 |
|
} |
| 7239 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 7240 |
320 |
@Override... |
| 7241 |
|
public Generic getOwnerType() { |
| 7242 |
320 |
TypeDescription declaringType = typeDescription.getDeclaringType(); |
| 7243 |
320 |
return declaringType == null |
| 7244 |
|
? UNDEFINED |
| 7245 |
|
: new LazyNonGenericReceiverType(declaringType); |
| 7246 |
|
} |
| 7247 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7248 |
0 |
@Override... |
| 7249 |
|
public Generic getComponentType() { |
| 7250 |
0 |
return UNDEFINED; |
| 7251 |
|
} |
| 7252 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 7253 |
330 |
@Override... |
| 7254 |
|
public AnnotationList getDeclaredAnnotations() { |
| 7255 |
330 |
StringBuilder typePath = new StringBuilder(); |
| 7256 |
336 |
for (int index = 0; index < typeDescription.getSegmentCount(); index++) { |
| 7257 |
6 |
typePath = typePath.append(GenericTypeToken.INNER_CLASS_PATH); |
| 7258 |
|
} |
| 7259 |
330 |
return LazyAnnotationDescription.asListOfNullable(typePool, receiverTypeAnnotationTokens.get(typePath.toString())); |
| 7260 |
|
} |
| 7261 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7262 |
1408 |
@Override... |
| 7263 |
|
public TypeDescription asErasure() { |
| 7264 |
1408 |
return typeDescription; |
| 7265 |
|
} |
| 7266 |
|
} |
| 7267 |
|
} |
| 7268 |
|
} |
| 7269 |
|
|
| 7270 |
|
|
| 7271 |
|
|
| 7272 |
|
|
| |
|
| 87.3% |
Uncovered Elements: 9 (71) |
Complexity: 23 |
Complexity Density: 0.49 |
|
| 7273 |
|
protected class TypeExtractor extends ClassVisitor { |
| 7274 |
|
|
| 7275 |
|
|
| 7276 |
|
|
| 7277 |
|
|
| 7278 |
|
private static final int REAL_MODIFIER_MASK = 0xFFFF; |
| 7279 |
|
|
| 7280 |
|
|
| 7281 |
|
|
| 7282 |
|
|
| 7283 |
|
private final Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> superTypeAnnotationTokens; |
| 7284 |
|
|
| 7285 |
|
|
| 7286 |
|
|
| 7287 |
|
|
| 7288 |
|
private final Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens; |
| 7289 |
|
|
| 7290 |
|
|
| 7291 |
|
|
| 7292 |
|
|
| 7293 |
|
private final Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> typeVariableBoundsAnnotationTokens; |
| 7294 |
|
|
| 7295 |
|
|
| 7296 |
|
|
| 7297 |
|
|
| 7298 |
|
private final List<LazyTypeDescription.AnnotationToken> annotationTokens; |
| 7299 |
|
|
| 7300 |
|
|
| 7301 |
|
|
| 7302 |
|
|
| 7303 |
|
private final List<LazyTypeDescription.FieldToken> fieldTokens; |
| 7304 |
|
|
| 7305 |
|
|
| 7306 |
|
|
| 7307 |
|
|
| 7308 |
|
private final List<LazyTypeDescription.MethodToken> methodTokens; |
| 7309 |
|
|
| 7310 |
|
|
| 7311 |
|
|
| 7312 |
|
|
| 7313 |
|
private int modifiers; |
| 7314 |
|
|
| 7315 |
|
|
| 7316 |
|
|
| 7317 |
|
|
| 7318 |
|
private String internalName; |
| 7319 |
|
|
| 7320 |
|
|
| 7321 |
|
|
| 7322 |
|
|
| 7323 |
|
private String superClassName; |
| 7324 |
|
|
| 7325 |
|
|
| 7326 |
|
|
| 7327 |
|
|
| 7328 |
|
private String genericSignature; |
| 7329 |
|
|
| 7330 |
|
|
| 7331 |
|
|
| 7332 |
|
|
| 7333 |
|
|
| 7334 |
|
private String[] interfaceName; |
| 7335 |
|
|
| 7336 |
|
|
| 7337 |
|
|
| 7338 |
|
|
| 7339 |
|
private boolean anonymousType; |
| 7340 |
|
|
| 7341 |
|
|
| 7342 |
|
|
| 7343 |
|
|
| 7344 |
|
private LazyTypeDescription.DeclarationContext declarationContext; |
| 7345 |
|
|
| 7346 |
|
|
| 7347 |
|
|
| 7348 |
|
|
| 7349 |
|
private final List<String> declaredTypes; |
| 7350 |
|
|
| 7351 |
|
|
| 7352 |
|
|
| 7353 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 1 |
Complexity Density: 0.1 |
|
| 7354 |
4977 |
protected TypeExtractor() {... |
| 7355 |
4977 |
super(Opcodes.ASM5); |
| 7356 |
4977 |
superTypeAnnotationTokens = new HashMap<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>(); |
| 7357 |
4977 |
typeVariableAnnotationTokens = new HashMap<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>(); |
| 7358 |
4977 |
typeVariableBoundsAnnotationTokens = new HashMap<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>>(); |
| 7359 |
4977 |
annotationTokens = new ArrayList<LazyTypeDescription.AnnotationToken>(); |
| 7360 |
4977 |
fieldTokens = new ArrayList<LazyTypeDescription.FieldToken>(); |
| 7361 |
4977 |
methodTokens = new ArrayList<LazyTypeDescription.MethodToken>(); |
| 7362 |
4977 |
anonymousType = false; |
| 7363 |
4977 |
declarationContext = LazyTypeDescription.DeclarationContext.SelfDeclared.INSTANCE; |
| 7364 |
4977 |
declaredTypes = new ArrayList<String>(); |
| 7365 |
|
} |
| 7366 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 7367 |
4977 |
@Override... |
| 7368 |
|
@SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "The received value is never modified") |
| 7369 |
|
public void visit(int classFileVersion, |
| 7370 |
|
int modifiers, |
| 7371 |
|
String internalName, |
| 7372 |
|
String genericSignature, |
| 7373 |
|
String superClassName, |
| 7374 |
|
String[] interfaceName) { |
| 7375 |
4977 |
this.modifiers = modifiers & REAL_MODIFIER_MASK; |
| 7376 |
4977 |
this.internalName = internalName; |
| 7377 |
4977 |
this.genericSignature = genericSignature; |
| 7378 |
4977 |
this.superClassName = superClassName; |
| 7379 |
4977 |
this.interfaceName = interfaceName; |
| 7380 |
|
} |
| 7381 |
|
|
| |
|
| 37.5% |
Uncovered Elements: 5 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
| 7382 |
61 |
@Override... |
| 7383 |
|
public void visitOuterClass(String typeName, String methodName, String methodDescriptor) { |
| 7384 |
61 |
if (methodName != null) { |
| 7385 |
61 |
declarationContext = new LazyTypeDescription.DeclarationContext.DeclaredInMethod(typeName, methodName, methodDescriptor); |
| 7386 |
0 |
} else if (typeName != null) { |
| 7387 |
0 |
declarationContext = new LazyTypeDescription.DeclarationContext.DeclaredInType(typeName); |
| 7388 |
|
} |
| 7389 |
|
} |
| 7390 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 8 |
Complexity Density: 1 |
|
| 7391 |
14656 |
@Override... |
| 7392 |
|
public void visitInnerClass(String internalName, String outerName, String innerName, int modifiers) { |
| 7393 |
14656 |
if (internalName.equals(this.internalName)) { |
| 7394 |
1947 |
this.modifiers = modifiers & REAL_MODIFIER_MASK; |
| 7395 |
1947 |
if (innerName == null) { |
| 7396 |
19 |
anonymousType = true; |
| 7397 |
|
} |
| 7398 |
|
|
| 7399 |
1947 |
if (outerName != null && declarationContext.isSelfDeclared()) { |
| 7400 |
1886 |
declarationContext = new LazyTypeDescription.DeclarationContext.DeclaredInType(outerName); |
| 7401 |
|
} |
| 7402 |
12709 |
} else if (outerName != null && innerName != null && internalName.equals(this.internalName + "$" + innerName)) { |
| 7403 |
6064 |
declaredTypes.add("L" + internalName + ";"); |
| 7404 |
|
} |
| 7405 |
|
} |
| 7406 |
|
|
| |
|
| 86.7% |
Uncovered Elements: 2 (15) |
Complexity: 4 |
Complexity Density: 0.27 |
|
| 7407 |
798 |
@Override... |
| 7408 |
|
public AnnotationVisitor visitTypeAnnotation(int rawTypeReference, TypePath typePath, String descriptor, boolean visible) { |
| 7409 |
798 |
AnnotationRegistrant annotationRegistrant; |
| 7410 |
798 |
TypeReference typeReference = new TypeReference(rawTypeReference); |
| 7411 |
798 |
switch (typeReference.getSort()) { |
| 7412 |
152 |
case TypeReference.CLASS_EXTENDS: |
| 7413 |
152 |
annotationRegistrant = new AnnotationRegistrant.ForTypeVariable.WithIndex(descriptor, |
| 7414 |
|
typePath, |
| 7415 |
|
typeReference.getSuperTypeIndex(), |
| 7416 |
|
superTypeAnnotationTokens); |
| 7417 |
152 |
break; |
| 7418 |
190 |
case TypeReference.CLASS_TYPE_PARAMETER: |
| 7419 |
190 |
annotationRegistrant = new AnnotationRegistrant.ForTypeVariable.WithIndex(descriptor, |
| 7420 |
|
typePath, |
| 7421 |
|
typeReference.getTypeParameterIndex(), |
| 7422 |
|
typeVariableAnnotationTokens); |
| 7423 |
190 |
break; |
| 7424 |
456 |
case TypeReference.CLASS_TYPE_PARAMETER_BOUND: |
| 7425 |
456 |
annotationRegistrant = new AnnotationRegistrant.ForTypeVariable.WithIndex.DoubleIndexed(descriptor, |
| 7426 |
|
typePath, |
| 7427 |
|
typeReference.getTypeParameterBoundIndex(), |
| 7428 |
|
typeReference.getTypeParameterIndex(), |
| 7429 |
|
typeVariableBoundsAnnotationTokens); |
| 7430 |
456 |
break; |
| 7431 |
0 |
default: |
| 7432 |
0 |
throw new IllegalArgumentException("Unexpected type reference: " + typeReference.getSort()); |
| 7433 |
|
} |
| 7434 |
798 |
return new AnnotationExtractor(annotationRegistrant, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7435 |
|
} |
| 7436 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7437 |
1857 |
@Override... |
| 7438 |
|
public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { |
| 7439 |
1857 |
return new AnnotationExtractor(descriptor, annotationTokens, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7440 |
|
} |
| 7441 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7442 |
8584 |
@Override... |
| 7443 |
|
public FieldVisitor visitField(int modifiers, String internalName, String descriptor, String genericSignature, Object defaultValue) { |
| 7444 |
8584 |
return new FieldExtractor(modifiers & REAL_MODIFIER_MASK, internalName, descriptor, genericSignature); |
| 7445 |
|
} |
| 7446 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 7447 |
106682 |
@Override... |
| 7448 |
|
public MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String genericSignature, String[] exceptionName) { |
| 7449 |
106682 |
return internalName.equals(MethodDescription.TYPE_INITIALIZER_INTERNAL_NAME) |
| 7450 |
|
? IGNORE_METHOD |
| 7451 |
|
: new MethodExtractor(modifiers & REAL_MODIFIER_MASK, internalName, descriptor, genericSignature, exceptionName); |
| 7452 |
|
} |
| 7453 |
|
|
| 7454 |
|
|
| 7455 |
|
|
| 7456 |
|
|
| 7457 |
|
|
| 7458 |
|
@return |
| 7459 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7460 |
4977 |
protected TypeDescription toTypeDescription() {... |
| 7461 |
4977 |
return new LazyTypeDescription(Default.this, |
| 7462 |
|
modifiers, |
| 7463 |
|
internalName, |
| 7464 |
|
superClassName, |
| 7465 |
|
interfaceName, |
| 7466 |
|
GenericTypeExtractor.ForSignature.OfType.extract(genericSignature), |
| 7467 |
|
declarationContext, |
| 7468 |
|
declaredTypes, |
| 7469 |
|
anonymousType, |
| 7470 |
|
superTypeAnnotationTokens, |
| 7471 |
|
typeVariableAnnotationTokens, |
| 7472 |
|
typeVariableBoundsAnnotationTokens, |
| 7473 |
|
annotationTokens, |
| 7474 |
|
fieldTokens, |
| 7475 |
|
methodTokens); |
| 7476 |
|
} |
| 7477 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7478 |
0 |
@Override... |
| 7479 |
|
public String toString() { |
| 7480 |
0 |
return "TypePool.Default.TypeExtractor{" + |
| 7481 |
|
"typePool=" + Default.this + |
| 7482 |
|
", annotationTokens=" + annotationTokens + |
| 7483 |
|
", fieldTokens=" + fieldTokens + |
| 7484 |
|
", methodTokens=" + methodTokens + |
| 7485 |
|
", modifiers=" + modifiers + |
| 7486 |
|
", internalName='" + internalName + '\'' + |
| 7487 |
|
", superClassName='" + superClassName + '\'' + |
| 7488 |
|
", genericSignature='" + genericSignature + '\'' + |
| 7489 |
|
", interfaceName=" + Arrays.toString(interfaceName) + |
| 7490 |
|
", anonymousType=" + anonymousType + |
| 7491 |
|
", declarationContext=" + declarationContext + |
| 7492 |
|
'}'; |
| 7493 |
|
} |
| 7494 |
|
|
| 7495 |
|
|
| 7496 |
|
|
| 7497 |
|
|
| 7498 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (22) |
Complexity: 10 |
Complexity Density: 0.91 |
|
| 7499 |
|
protected class AnnotationExtractor extends AnnotationVisitor { |
| 7500 |
|
|
| 7501 |
|
|
| 7502 |
|
|
| 7503 |
|
|
| 7504 |
|
private final AnnotationRegistrant annotationRegistrant; |
| 7505 |
|
|
| 7506 |
|
|
| 7507 |
|
|
| 7508 |
|
|
| 7509 |
|
private final ComponentTypeLocator componentTypeLocator; |
| 7510 |
|
|
| 7511 |
|
|
| 7512 |
|
|
| 7513 |
|
|
| 7514 |
|
@param |
| 7515 |
|
@param |
| 7516 |
|
@param |
| 7517 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7518 |
20500 |
protected AnnotationExtractor(String descriptor, List<LazyTypeDescription.AnnotationToken> annotationTokens, ComponentTypeLocator componentTypeLocator) {... |
| 7519 |
20500 |
this(new AnnotationRegistrant.ForByteCodeElement(descriptor, annotationTokens), componentTypeLocator); |
| 7520 |
|
} |
| 7521 |
|
|
| 7522 |
|
|
| 7523 |
|
|
| 7524 |
|
|
| 7525 |
|
@param |
| 7526 |
|
@param |
| 7527 |
|
@param |
| 7528 |
|
@param |
| 7529 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7530 |
412 |
protected AnnotationExtractor(String descriptor,... |
| 7531 |
|
int index, |
| 7532 |
|
Map<Integer, List<LazyTypeDescription.AnnotationToken>> annotationTokens, |
| 7533 |
|
ComponentTypeLocator componentTypeLocator) { |
| 7534 |
412 |
this(new AnnotationRegistrant.ForByteCodeElement.WithIndex(descriptor, index, annotationTokens), componentTypeLocator); |
| 7535 |
|
} |
| 7536 |
|
|
| 7537 |
|
|
| 7538 |
|
|
| 7539 |
|
|
| 7540 |
|
@param |
| 7541 |
|
@param |
| 7542 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 7543 |
23786 |
protected AnnotationExtractor(AnnotationRegistrant annotationRegistrant, ComponentTypeLocator componentTypeLocator) {... |
| 7544 |
23786 |
super(Opcodes.ASM5); |
| 7545 |
23786 |
this.annotationRegistrant = annotationRegistrant; |
| 7546 |
23786 |
this.componentTypeLocator = componentTypeLocator; |
| 7547 |
|
} |
| 7548 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 7549 |
10479 |
@Override... |
| 7550 |
|
public void visit(String name, Object value) { |
| 7551 |
10479 |
annotationRegistrant.register(name, value instanceof Type |
| 7552 |
|
? new RawTypeValue(Default.this, (Type) value) |
| 7553 |
|
: new AnnotationDescription.AnnotationValue.Trivial<Object>(value)); |
| 7554 |
|
} |
| 7555 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7556 |
1810 |
@Override... |
| 7557 |
|
public void visitEnum(String name, String descriptor, String value) { |
| 7558 |
1810 |
annotationRegistrant.register(name, new RawEnumerationValue(Default.this, descriptor, value)); |
| 7559 |
|
} |
| 7560 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7561 |
56 |
@Override... |
| 7562 |
|
public AnnotationVisitor visitAnnotation(String name, String descriptor) { |
| 7563 |
56 |
return new AnnotationExtractor(new AnnotationLookup(descriptor, name), |
| 7564 |
|
new ComponentTypeLocator.ForAnnotationProperty(TypePool.Default.this, descriptor)); |
| 7565 |
|
} |
| 7566 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7567 |
639 |
@Override... |
| 7568 |
|
public AnnotationVisitor visitArray(String name) { |
| 7569 |
639 |
return new AnnotationExtractor(new ArrayLookup(name, componentTypeLocator.bind(name)), ComponentTypeLocator.Illegal.INSTANCE); |
| 7570 |
|
} |
| 7571 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7572 |
23780 |
@Override... |
| 7573 |
|
public void visitEnd() { |
| 7574 |
23780 |
annotationRegistrant.onComplete(); |
| 7575 |
|
} |
| 7576 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7577 |
18 |
@Override... |
| 7578 |
|
public String toString() { |
| 7579 |
18 |
return "TypePool.Default.TypeExtractor.AnnotationExtractor{" + |
| 7580 |
|
"typeExtractor=" + TypeExtractor.this + |
| 7581 |
|
"annotationRegistrant=" + annotationRegistrant + |
| 7582 |
|
", componentTypeLocator=" + componentTypeLocator + |
| 7583 |
|
'}'; |
| 7584 |
|
} |
| 7585 |
|
|
| 7586 |
|
|
| 7587 |
|
|
| 7588 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 7589 |
|
protected class ArrayLookup implements AnnotationRegistrant { |
| 7590 |
|
|
| 7591 |
|
|
| 7592 |
|
|
| 7593 |
|
|
| 7594 |
|
private final String name; |
| 7595 |
|
|
| 7596 |
|
|
| 7597 |
|
|
| 7598 |
|
|
| 7599 |
|
private final RawNonPrimitiveArray.ComponentTypeReference componentTypeReference; |
| 7600 |
|
|
| 7601 |
|
|
| 7602 |
|
|
| 7603 |
|
|
| 7604 |
|
private final List<AnnotationDescription.AnnotationValue<?, ?>> values; |
| 7605 |
|
|
| 7606 |
|
|
| 7607 |
|
|
| 7608 |
|
|
| 7609 |
|
@param |
| 7610 |
|
@param |
| 7611 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 7612 |
641 |
protected ArrayLookup(String name, RawNonPrimitiveArray.ComponentTypeReference componentTypeReference) {... |
| 7613 |
641 |
this.name = name; |
| 7614 |
641 |
this.componentTypeReference = componentTypeReference; |
| 7615 |
641 |
values = new ArrayList<AnnotationDescription.AnnotationValue<?, ?>>(); |
| 7616 |
|
} |
| 7617 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7618 |
1115 |
@Override... |
| 7619 |
|
public void register(String ignored, AnnotationDescription.AnnotationValue<?, ?> annotationValue) { |
| 7620 |
1115 |
values.add(annotationValue); |
| 7621 |
|
} |
| 7622 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7623 |
639 |
@Override... |
| 7624 |
|
public void onComplete() { |
| 7625 |
639 |
annotationRegistrant.register(name, new RawNonPrimitiveArray(Default.this, componentTypeReference, values)); |
| 7626 |
|
} |
| 7627 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7628 |
5 |
@Override... |
| 7629 |
|
public String toString() { |
| 7630 |
5 |
return "TypePool.Default.TypeExtractor.AnnotationExtractor.ArrayLookup{" + |
| 7631 |
|
"annotationExtractor=" + AnnotationExtractor.this + |
| 7632 |
|
", name='" + name + '\'' + |
| 7633 |
|
", componentTypeReference=" + componentTypeReference + |
| 7634 |
|
", values=" + values + |
| 7635 |
|
'}'; |
| 7636 |
|
} |
| 7637 |
|
} |
| 7638 |
|
|
| 7639 |
|
|
| 7640 |
|
|
| 7641 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 7642 |
|
protected class AnnotationLookup implements AnnotationRegistrant { |
| 7643 |
|
|
| 7644 |
|
|
| 7645 |
|
|
| 7646 |
|
|
| 7647 |
|
private final String descriptor; |
| 7648 |
|
|
| 7649 |
|
|
| 7650 |
|
|
| 7651 |
|
|
| 7652 |
|
private final String name; |
| 7653 |
|
|
| 7654 |
|
|
| 7655 |
|
|
| 7656 |
|
|
| 7657 |
|
private final Map<String, AnnotationDescription.AnnotationValue<?, ?>> values; |
| 7658 |
|
|
| 7659 |
|
|
| 7660 |
|
|
| 7661 |
|
|
| 7662 |
|
@param |
| 7663 |
|
@param |
| 7664 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 7665 |
58 |
protected AnnotationLookup(String descriptor, String name) {... |
| 7666 |
58 |
this.descriptor = descriptor; |
| 7667 |
58 |
this.name = name; |
| 7668 |
58 |
values = new HashMap<String, AnnotationDescription.AnnotationValue<?, ?>>(); |
| 7669 |
|
} |
| 7670 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7671 |
2 |
@Override... |
| 7672 |
|
public void register(String name, AnnotationDescription.AnnotationValue<?, ?> annotationValue) { |
| 7673 |
2 |
values.put(name, annotationValue); |
| 7674 |
|
} |
| 7675 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7676 |
56 |
@Override... |
| 7677 |
|
public void onComplete() { |
| 7678 |
56 |
annotationRegistrant.register(name, new RawAnnotationValue(Default.this, new LazyTypeDescription.AnnotationToken(descriptor, values))); |
| 7679 |
|
} |
| 7680 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7681 |
5 |
@Override... |
| 7682 |
|
public String toString() { |
| 7683 |
5 |
return "TypePool.Default.TypeExtractor.AnnotationExtractor.AnnotationLookup{" + |
| 7684 |
|
"descriptor='" + descriptor + '\'' + |
| 7685 |
|
", name='" + name + '\'' + |
| 7686 |
|
", values=" + values + |
| 7687 |
|
'}'; |
| 7688 |
|
} |
| 7689 |
|
} |
| 7690 |
|
} |
| 7691 |
|
|
| 7692 |
|
|
| 7693 |
|
|
| 7694 |
|
|
| 7695 |
|
|
| |
|
| 91.7% |
Uncovered Elements: 2 (24) |
Complexity: 6 |
Complexity Density: 0.32 |
|
| 7696 |
|
protected class FieldExtractor extends FieldVisitor { |
| 7697 |
|
|
| 7698 |
|
|
| 7699 |
|
|
| 7700 |
|
|
| 7701 |
|
private final int modifiers; |
| 7702 |
|
|
| 7703 |
|
|
| 7704 |
|
|
| 7705 |
|
|
| 7706 |
|
private final String internalName; |
| 7707 |
|
|
| 7708 |
|
|
| 7709 |
|
|
| 7710 |
|
|
| 7711 |
|
private final String descriptor; |
| 7712 |
|
|
| 7713 |
|
|
| 7714 |
|
|
| 7715 |
|
|
| 7716 |
|
private final String genericSignature; |
| 7717 |
|
|
| 7718 |
|
|
| 7719 |
|
|
| 7720 |
|
|
| 7721 |
|
private final Map<String, List<LazyTypeDescription.AnnotationToken>> typeAnnotationTokens; |
| 7722 |
|
|
| 7723 |
|
|
| 7724 |
|
|
| 7725 |
|
|
| 7726 |
|
private final List<LazyTypeDescription.AnnotationToken> annotationTokens; |
| 7727 |
|
|
| 7728 |
|
|
| 7729 |
|
|
| 7730 |
|
|
| 7731 |
|
@param |
| 7732 |
|
@param |
| 7733 |
|
@param |
| 7734 |
|
@param |
| 7735 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
| 7736 |
8586 |
protected FieldExtractor(int modifiers,... |
| 7737 |
|
String internalName, |
| 7738 |
|
String descriptor, |
| 7739 |
|
String genericSignature) { |
| 7740 |
8586 |
super(Opcodes.ASM5); |
| 7741 |
8586 |
this.modifiers = modifiers; |
| 7742 |
8586 |
this.internalName = internalName; |
| 7743 |
8586 |
this.descriptor = descriptor; |
| 7744 |
8586 |
this.genericSignature = genericSignature; |
| 7745 |
8586 |
typeAnnotationTokens = new HashMap<String, List<LazyTypeDescription.AnnotationToken>>(); |
| 7746 |
8586 |
annotationTokens = new ArrayList<LazyTypeDescription.AnnotationToken>(); |
| 7747 |
|
} |
| 7748 |
|
|
| |
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 2 |
Complexity Density: 0.22 |
|
| 7749 |
278 |
@Override... |
| 7750 |
|
public AnnotationVisitor visitTypeAnnotation(int rawTypeReference, TypePath typePath, String descriptor, boolean visible) { |
| 7751 |
278 |
AnnotationRegistrant annotationRegistrant; |
| 7752 |
278 |
TypeReference typeReference = new TypeReference(rawTypeReference); |
| 7753 |
278 |
switch (typeReference.getSort()) { |
| 7754 |
278 |
case TypeReference.FIELD: |
| 7755 |
278 |
annotationRegistrant = new AnnotationRegistrant.ForTypeVariable(descriptor, typePath, typeAnnotationTokens); |
| 7756 |
278 |
break; |
| 7757 |
0 |
default: |
| 7758 |
0 |
throw new IllegalStateException("Unexpected type reference on field: " + typeReference.getSort()); |
| 7759 |
|
} |
| 7760 |
278 |
return new AnnotationExtractor(annotationRegistrant, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7761 |
|
} |
| 7762 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7763 |
185 |
@Override... |
| 7764 |
|
public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { |
| 7765 |
185 |
return new AnnotationExtractor(descriptor, annotationTokens, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7766 |
|
} |
| 7767 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7768 |
8584 |
@Override... |
| 7769 |
|
public void visitEnd() { |
| 7770 |
8584 |
fieldTokens.add(new LazyTypeDescription.FieldToken(internalName, |
| 7771 |
|
modifiers, |
| 7772 |
|
descriptor, |
| 7773 |
|
GenericTypeExtractor.ForSignature.OfField.extract(genericSignature), |
| 7774 |
|
typeAnnotationTokens, |
| 7775 |
|
annotationTokens)); |
| 7776 |
|
} |
| 7777 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7778 |
14 |
@Override... |
| 7779 |
|
public String toString() { |
| 7780 |
14 |
return "TypePool.Default.TypeExtractor.FieldExtractor{" + |
| 7781 |
|
"typeExtractor=" + TypeExtractor.this + |
| 7782 |
|
", modifiers=" + modifiers + |
| 7783 |
|
", internalName='" + internalName + '\'' + |
| 7784 |
|
", descriptor='" + descriptor + '\'' + |
| 7785 |
|
", genericSignature='" + genericSignature + '\'' + |
| 7786 |
|
", typeAnnotationTokens=" + typeAnnotationTokens + |
| 7787 |
|
", annotationTokens=" + annotationTokens + |
| 7788 |
|
'}'; |
| 7789 |
|
} |
| 7790 |
|
} |
| 7791 |
|
|
| 7792 |
|
|
| 7793 |
|
|
| 7794 |
|
|
| 7795 |
|
|
| |
|
| 97.1% |
Uncovered Elements: 2 (69) |
Complexity: 23 |
Complexity Density: 0.45 |
|
| 7796 |
|
protected class MethodExtractor extends MethodVisitor implements AnnotationRegistrant { |
| 7797 |
|
|
| 7798 |
|
|
| 7799 |
|
|
| 7800 |
|
|
| 7801 |
|
private final int modifiers; |
| 7802 |
|
|
| 7803 |
|
|
| 7804 |
|
|
| 7805 |
|
|
| 7806 |
|
private final String internalName; |
| 7807 |
|
|
| 7808 |
|
|
| 7809 |
|
|
| 7810 |
|
|
| 7811 |
|
private final String descriptor; |
| 7812 |
|
|
| 7813 |
|
|
| 7814 |
|
|
| 7815 |
|
|
| 7816 |
|
private final String genericSignature; |
| 7817 |
|
|
| 7818 |
|
|
| 7819 |
|
|
| 7820 |
|
|
| 7821 |
|
|
| 7822 |
|
private final String[] exceptionName; |
| 7823 |
|
|
| 7824 |
|
|
| 7825 |
|
|
| 7826 |
|
|
| 7827 |
|
private final Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> typeVariableAnnotationTokens; |
| 7828 |
|
|
| 7829 |
|
|
| 7830 |
|
|
| 7831 |
|
|
| 7832 |
|
private final Map<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>> typeVariableBoundAnnotationTokens; |
| 7833 |
|
|
| 7834 |
|
|
| 7835 |
|
|
| 7836 |
|
|
| 7837 |
|
private final Map<String, List<LazyTypeDescription.AnnotationToken>> returnTypeAnnotationTokens; |
| 7838 |
|
|
| 7839 |
|
|
| 7840 |
|
|
| 7841 |
|
|
| 7842 |
|
private final Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> parameterTypeAnnotationTokens; |
| 7843 |
|
|
| 7844 |
|
|
| 7845 |
|
|
| 7846 |
|
|
| 7847 |
|
private final Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>> exceptionTypeAnnotationTokens; |
| 7848 |
|
|
| 7849 |
|
|
| 7850 |
|
|
| 7851 |
|
|
| 7852 |
|
private final Map<String, List<LazyTypeDescription.AnnotationToken>> receiverTypeAnnotationTokens; |
| 7853 |
|
|
| 7854 |
|
|
| 7855 |
|
|
| 7856 |
|
|
| 7857 |
|
private final List<LazyTypeDescription.AnnotationToken> annotationTokens; |
| 7858 |
|
|
| 7859 |
|
|
| 7860 |
|
|
| 7861 |
|
|
| 7862 |
|
private final Map<Integer, List<LazyTypeDescription.AnnotationToken>> parameterAnnotationTokens; |
| 7863 |
|
|
| 7864 |
|
|
| 7865 |
|
|
| 7866 |
|
|
| 7867 |
|
|
| 7868 |
|
private final List<LazyTypeDescription.MethodToken.ParameterToken> parameterTokens; |
| 7869 |
|
|
| 7870 |
|
|
| 7871 |
|
|
| 7872 |
|
|
| 7873 |
|
|
| 7874 |
|
private final ParameterBag legacyParameterBag; |
| 7875 |
|
|
| 7876 |
|
|
| 7877 |
|
|
| 7878 |
|
|
| 7879 |
|
|
| 7880 |
|
private Label firstLabel; |
| 7881 |
|
|
| 7882 |
|
|
| 7883 |
|
|
| 7884 |
|
|
| 7885 |
|
private AnnotationDescription.AnnotationValue<?, ?> defaultValue; |
| 7886 |
|
|
| 7887 |
|
|
| 7888 |
|
|
| 7889 |
|
|
| 7890 |
|
@param |
| 7891 |
|
@param |
| 7892 |
|
@param |
| 7893 |
|
@param |
| 7894 |
|
@param |
| 7895 |
|
|
| 7896 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 1 |
Complexity Density: 0.06 |
|
| 7897 |
105207 |
protected MethodExtractor(int modifiers,... |
| 7898 |
|
String internalName, |
| 7899 |
|
String descriptor, |
| 7900 |
|
String genericSignature, |
| 7901 |
|
String[] exceptionName) { |
| 7902 |
105207 |
super(Opcodes.ASM5); |
| 7903 |
105207 |
this.modifiers = modifiers; |
| 7904 |
105207 |
this.internalName = internalName; |
| 7905 |
105207 |
this.descriptor = descriptor; |
| 7906 |
105207 |
this.genericSignature = genericSignature; |
| 7907 |
105207 |
this.exceptionName = exceptionName; |
| 7908 |
105207 |
typeVariableAnnotationTokens = new HashMap<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>(); |
| 7909 |
105207 |
typeVariableBoundAnnotationTokens = new HashMap<Integer, Map<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>>(); |
| 7910 |
105207 |
returnTypeAnnotationTokens = new HashMap<String, List<LazyTypeDescription.AnnotationToken>>(); |
| 7911 |
105207 |
parameterTypeAnnotationTokens = new HashMap<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>(); |
| 7912 |
105207 |
exceptionTypeAnnotationTokens = new HashMap<Integer, Map<String, List<LazyTypeDescription.AnnotationToken>>>(); |
| 7913 |
105207 |
receiverTypeAnnotationTokens = new HashMap<String, List<LazyTypeDescription.AnnotationToken>>(); |
| 7914 |
105207 |
annotationTokens = new ArrayList<LazyTypeDescription.AnnotationToken>(); |
| 7915 |
105207 |
parameterAnnotationTokens = new HashMap<Integer, List<LazyTypeDescription.AnnotationToken>>(); |
| 7916 |
105207 |
parameterTokens = new ArrayList<LazyTypeDescription.MethodToken.ParameterToken>(); |
| 7917 |
105207 |
legacyParameterBag = new ParameterBag(Type.getMethodType(descriptor).getArgumentTypes()); |
| 7918 |
|
} |
| 7919 |
|
|
| |
|
| 91.7% |
Uncovered Elements: 2 (24) |
Complexity: 7 |
Complexity Density: 0.29 |
|
| 7920 |
1016 |
@Override... |
| 7921 |
|
public AnnotationVisitor visitTypeAnnotation(int rawTypeReference, TypePath typePath, String descriptor, boolean visible) { |
| 7922 |
1016 |
AnnotationRegistrant annotationRegistrant; |
| 7923 |
1016 |
TypeReference typeReference = new TypeReference(rawTypeReference); |
| 7924 |
1016 |
switch (typeReference.getSort()) { |
| 7925 |
38 |
case TypeReference.METHOD_TYPE_PARAMETER: |
| 7926 |
38 |
annotationRegistrant = new ForTypeVariable.WithIndex(descriptor, |
| 7927 |
|
typePath, |
| 7928 |
|
typeReference.getTypeParameterIndex(), |
| 7929 |
|
typeVariableAnnotationTokens); |
| 7930 |
38 |
break; |
| 7931 |
38 |
case TypeReference.METHOD_TYPE_PARAMETER_BOUND: |
| 7932 |
38 |
annotationRegistrant = new ForTypeVariable.WithIndex.DoubleIndexed(descriptor, |
| 7933 |
|
typePath, |
| 7934 |
|
typeReference.getTypeParameterBoundIndex(), |
| 7935 |
|
typeReference.getTypeParameterIndex(), |
| 7936 |
|
typeVariableBoundAnnotationTokens); |
| 7937 |
38 |
break; |
| 7938 |
280 |
case TypeReference.METHOD_RETURN: |
| 7939 |
280 |
annotationRegistrant = new ForTypeVariable(descriptor, |
| 7940 |
|
typePath, |
| 7941 |
|
returnTypeAnnotationTokens); |
| 7942 |
280 |
break; |
| 7943 |
356 |
case TypeReference.METHOD_FORMAL_PARAMETER: |
| 7944 |
356 |
annotationRegistrant = new ForTypeVariable.WithIndex(descriptor, |
| 7945 |
|
typePath, |
| 7946 |
|
typeReference.getFormalParameterIndex(), |
| 7947 |
|
parameterTypeAnnotationTokens); |
| 7948 |
356 |
break; |
| 7949 |
90 |
case TypeReference.THROWS: |
| 7950 |
90 |
annotationRegistrant = new ForTypeVariable.WithIndex(descriptor, |
| 7951 |
|
typePath, |
| 7952 |
|
typeReference.getExceptionIndex(), |
| 7953 |
|
exceptionTypeAnnotationTokens); |
| 7954 |
90 |
break; |
| 7955 |
214 |
case TypeReference.METHOD_RECEIVER: |
| 7956 |
214 |
annotationRegistrant = new ForTypeVariable(descriptor, |
| 7957 |
|
typePath, |
| 7958 |
|
receiverTypeAnnotationTokens); |
| 7959 |
214 |
break; |
| 7960 |
0 |
default: |
| 7961 |
0 |
throw new IllegalStateException("Unexpected type reference on method: " + typeReference.getSort()); |
| 7962 |
|
} |
| 7963 |
1016 |
return new AnnotationExtractor(annotationRegistrant, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7964 |
|
} |
| 7965 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7966 |
18456 |
@Override... |
| 7967 |
|
public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) { |
| 7968 |
18456 |
return new AnnotationExtractor(descriptor, annotationTokens, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7969 |
|
} |
| 7970 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7971 |
410 |
@Override... |
| 7972 |
|
public AnnotationVisitor visitParameterAnnotation(int index, String descriptor, boolean visible) { |
| 7973 |
410 |
return new AnnotationExtractor(descriptor, index, parameterAnnotationTokens, new ComponentTypeLocator.ForAnnotationProperty(Default.this, descriptor)); |
| 7974 |
|
} |
| 7975 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 3 |
Complexity Density: 1.5 |
|
| 7976 |
664912 |
@Override... |
| 7977 |
|
public void visitLabel(Label label) { |
| 7978 |
664912 |
if (readerMode.isExtended() && firstLabel == null) { |
| 7979 |
79765 |
firstLabel = label; |
| 7980 |
|
} |
| 7981 |
|
} |
| 7982 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 3 |
Complexity Density: 1.5 |
|
| 7983 |
77602 |
@Override... |
| 7984 |
|
public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index) { |
| 7985 |
77602 |
if (readerMode.isExtended() && start == firstLabel) { |
| 7986 |
28694 |
legacyParameterBag.register(index, name); |
| 7987 |
|
} |
| 7988 |
|
} |
| 7989 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7990 |
208 |
@Override... |
| 7991 |
|
public void visitParameter(String name, int modifiers) { |
| 7992 |
208 |
parameterTokens.add(new LazyTypeDescription.MethodToken.ParameterToken(name, modifiers)); |
| 7993 |
|
} |
| 7994 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 7995 |
85 |
@Override... |
| 7996 |
|
public AnnotationVisitor visitAnnotationDefault() { |
| 7997 |
85 |
return new AnnotationExtractor(this, new ComponentTypeLocator.ForArrayType(descriptor)); |
| 7998 |
|
} |
| 7999 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8000 |
85 |
@Override... |
| 8001 |
|
public void register(String ignored, AnnotationDescription.AnnotationValue<?, ?> annotationValue) { |
| 8002 |
85 |
defaultValue = annotationValue; |
| 8003 |
|
} |
| 8004 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 8005 |
85 |
@Override... |
| 8006 |
|
public void onComplete() { |
| 8007 |
|
|
| 8008 |
|
} |
| 8009 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 2 |
Complexity Density: 2 |
|
| 8010 |
105205 |
@Override... |
| 8011 |
|
public void visitEnd() { |
| 8012 |
105205 |
methodTokens.add(new LazyTypeDescription.MethodToken(internalName, |
| 8013 |
|
modifiers, |
| 8014 |
|
descriptor, |
| 8015 |
|
GenericTypeExtractor.ForSignature.OfMethod.extract(genericSignature), |
| 8016 |
|
exceptionName, |
| 8017 |
|
typeVariableAnnotationTokens, |
| 8018 |
|
typeVariableBoundAnnotationTokens, |
| 8019 |
|
returnTypeAnnotationTokens, |
| 8020 |
|
parameterTypeAnnotationTokens, |
| 8021 |
|
exceptionTypeAnnotationTokens, |
| 8022 |
|
receiverTypeAnnotationTokens, |
| 8023 |
|
annotationTokens, |
| 8024 |
|
parameterAnnotationTokens, |
| 8025 |
105205 |
parameterTokens.isEmpty() |
| 8026 |
|
? legacyParameterBag.resolve((modifiers & Opcodes.ACC_STATIC) != 0) |
| 8027 |
|
: parameterTokens, |
| 8028 |
|
defaultValue)); |
| 8029 |
|
} |
| 8030 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8031 |
36 |
@Override... |
| 8032 |
|
public String toString() { |
| 8033 |
36 |
return "TypePool.Default.TypeExtractor.MethodExtractor{" + |
| 8034 |
|
"typeExtractor=" + TypeExtractor.this + |
| 8035 |
|
", modifiers=" + modifiers + |
| 8036 |
|
", internalName='" + internalName + '\'' + |
| 8037 |
|
", descriptor='" + descriptor + '\'' + |
| 8038 |
|
", genericSignature='" + genericSignature + '\'' + |
| 8039 |
|
", exceptionName=" + Arrays.toString(exceptionName) + |
| 8040 |
|
", typeVariableAnnotationTokens=" + typeVariableAnnotationTokens + |
| 8041 |
|
", typeVariableBoundAnnotationTokens=" + typeVariableBoundAnnotationTokens + |
| 8042 |
|
", returnTypeAnnotationTokens=" + returnTypeAnnotationTokens + |
| 8043 |
|
", parameterTypeAnnotationTokens=" + parameterTypeAnnotationTokens + |
| 8044 |
|
", exceptionTypeAnnotationTokens=" + exceptionTypeAnnotationTokens + |
| 8045 |
|
", receiverTypeAnnotationTokens=" + receiverTypeAnnotationTokens + |
| 8046 |
|
", annotationTokens=" + annotationTokens + |
| 8047 |
|
", parameterAnnotationTokens=" + parameterAnnotationTokens + |
| 8048 |
|
", parameterTokens=" + parameterTokens + |
| 8049 |
|
", legacyParameterBag=" + legacyParameterBag + |
| 8050 |
|
", firstLabel=" + firstLabel + |
| 8051 |
|
", defaultValue=" + defaultValue + |
| 8052 |
|
'}'; |
| 8053 |
|
} |
| 8054 |
|
} |
| 8055 |
|
} |
| 8056 |
|
|
| 8057 |
|
|
| 8058 |
|
@link |
| 8059 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 4 |
Complexity Density: 1 |
|
| 8060 |
|
public enum ReaderMode { |
| 8061 |
|
|
| 8062 |
|
|
| 8063 |
|
|
| 8064 |
|
|
| 8065 |
|
|
| 8066 |
|
EXTENDED(ClassReader.SKIP_FRAMES), |
| 8067 |
|
|
| 8068 |
|
|
| 8069 |
|
|
| 8070 |
|
|
| 8071 |
|
|
| 8072 |
|
|
| 8073 |
|
FAST(ClassReader.SKIP_CODE); |
| 8074 |
|
|
| 8075 |
|
|
| 8076 |
|
@link |
| 8077 |
|
|
| 8078 |
|
private final int flags; |
| 8079 |
|
|
| 8080 |
|
|
| 8081 |
|
|
| 8082 |
|
|
| 8083 |
|
@param@link |
| 8084 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8085 |
2 |
ReaderMode(int flags) {... |
| 8086 |
2 |
this.flags = flags; |
| 8087 |
|
} |
| 8088 |
|
|
| 8089 |
|
|
| 8090 |
|
@link |
| 8091 |
|
|
| 8092 |
|
@return@link |
| 8093 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8094 |
4979 |
protected int getFlags() {... |
| 8095 |
4979 |
return flags; |
| 8096 |
|
} |
| 8097 |
|
|
| 8098 |
|
|
| 8099 |
|
|
| 8100 |
|
|
| 8101 |
|
@return |
| 8102 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8103 |
742516 |
public boolean isExtended() {... |
| 8104 |
742516 |
return this == EXTENDED; |
| 8105 |
|
} |
| 8106 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8107 |
18 |
@Override... |
| 8108 |
|
public String toString() { |
| 8109 |
18 |
return "TypePool.Default.ReaderMode." + name(); |
| 8110 |
|
} |
| 8111 |
|
} |
| 8112 |
|
} |
| 8113 |
|
|
| 8114 |
|
|
| 8115 |
|
|
| 8116 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (13) |
Complexity: 6 |
Complexity Density: 0.86 |
|
| 8117 |
|
class LazyFacade extends AbstractBase { |
| 8118 |
|
|
| 8119 |
|
|
| 8120 |
|
|
| 8121 |
|
|
| 8122 |
|
private final TypePool typePool; |
| 8123 |
|
|
| 8124 |
|
|
| 8125 |
|
|
| 8126 |
|
|
| 8127 |
|
@param |
| 8128 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 8129 |
48690 |
public LazyFacade(TypePool typePool) {... |
| 8130 |
48690 |
super(CacheProvider.NoOp.INSTANCE); |
| 8131 |
48690 |
this.typePool = typePool; |
| 8132 |
|
} |
| 8133 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8134 |
48474 |
@Override... |
| 8135 |
|
protected Resolution doDescribe(String name) { |
| 8136 |
48474 |
return new LazyResolution(typePool, name); |
| 8137 |
|
} |
| 8138 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8139 |
547 |
@Override... |
| 8140 |
|
public void clear() { |
| 8141 |
547 |
typePool.clear(); |
| 8142 |
|
} |
| 8143 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8144 |
9 |
@Override... |
| 8145 |
|
public boolean equals(Object other) { |
| 8146 |
9 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 8147 |
|
&& typePool.equals(((LazyFacade) other).typePool); |
| 8148 |
|
} |
| 8149 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8150 |
3 |
@Override... |
| 8151 |
|
public int hashCode() { |
| 8152 |
3 |
return typePool.hashCode(); |
| 8153 |
|
} |
| 8154 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8155 |
4 |
@Override... |
| 8156 |
|
public String toString() { |
| 8157 |
4 |
return "TypePool.LazyFacade{" + |
| 8158 |
|
"typePool=" + typePool + |
| 8159 |
|
'}'; |
| 8160 |
|
} |
| 8161 |
|
|
| 8162 |
|
|
| 8163 |
|
|
| 8164 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (24) |
Complexity: 9 |
Complexity Density: 0.64 |
|
| 8165 |
|
protected static class LazyResolution implements Resolution { |
| 8166 |
|
|
| 8167 |
|
|
| 8168 |
|
|
| 8169 |
|
|
| 8170 |
|
private final TypePool typePool; |
| 8171 |
|
|
| 8172 |
|
|
| 8173 |
|
|
| 8174 |
|
|
| 8175 |
|
private final String name; |
| 8176 |
|
|
| 8177 |
|
|
| 8178 |
|
|
| 8179 |
|
|
| 8180 |
|
@param |
| 8181 |
|
@param |
| 8182 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 8183 |
48478 |
protected LazyResolution(TypePool typePool, String name) {... |
| 8184 |
48478 |
this.typePool = typePool; |
| 8185 |
48478 |
this.name = name; |
| 8186 |
|
} |
| 8187 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8188 |
1 |
@Override... |
| 8189 |
|
public boolean isResolved() { |
| 8190 |
1 |
return typePool.describe(name).isResolved(); |
| 8191 |
|
} |
| 8192 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8193 |
48473 |
@Override... |
| 8194 |
|
public TypeDescription resolve() { |
| 8195 |
48473 |
return new LazyTypeDescription(typePool, name); |
| 8196 |
|
} |
| 8197 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 8198 |
6 |
@Override... |
| 8199 |
|
public boolean equals(Object other) { |
| 8200 |
1 |
if (this == other) return true; |
| 8201 |
2 |
if (other == null || getClass() != other.getClass()) return false; |
| 8202 |
3 |
LazyResolution that = (LazyResolution) other; |
| 8203 |
3 |
return typePool.equals(that.typePool) && name.equals(that.name); |
| 8204 |
|
} |
| 8205 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 8206 |
4 |
@Override... |
| 8207 |
|
public int hashCode() { |
| 8208 |
4 |
int result = typePool.hashCode(); |
| 8209 |
4 |
result = 31 * result + name.hashCode(); |
| 8210 |
4 |
return result; |
| 8211 |
|
} |
| 8212 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8213 |
4 |
@Override... |
| 8214 |
|
public String toString() { |
| 8215 |
4 |
return "TypePool.LazyFacade.LazyResolution{" + |
| 8216 |
|
"typePool=" + typePool + |
| 8217 |
|
", name=" + name + |
| 8218 |
|
'}'; |
| 8219 |
|
} |
| 8220 |
|
|
| 8221 |
|
|
| 8222 |
|
|
| 8223 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (37) |
Complexity: 18 |
Complexity Density: 0.95 |
|
| 8224 |
|
protected static class LazyTypeDescription extends TypeDescription.AbstractBase.OfSimpleType { |
| 8225 |
|
|
| 8226 |
|
|
| 8227 |
|
|
| 8228 |
|
|
| 8229 |
|
private final TypePool typePool; |
| 8230 |
|
|
| 8231 |
|
|
| 8232 |
|
|
| 8233 |
|
|
| 8234 |
|
private final String name; |
| 8235 |
|
|
| 8236 |
|
|
| 8237 |
|
|
| 8238 |
|
|
| 8239 |
|
@param |
| 8240 |
|
@param |
| 8241 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 8242 |
48473 |
protected LazyTypeDescription(TypePool typePool, String name) {... |
| 8243 |
48473 |
this.typePool = typePool; |
| 8244 |
48473 |
this.name = name; |
| 8245 |
|
} |
| 8246 |
|
|
| 8247 |
|
|
| 8248 |
|
|
| 8249 |
|
|
| 8250 |
|
@return |
| 8251 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8252 |
2102 |
private TypeDescription resolve() {... |
| 8253 |
2102 |
return typePool.describe(name).resolve(); |
| 8254 |
|
} |
| 8255 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8256 |
178 |
@Override... |
| 8257 |
|
public Generic getSuperClass() { |
| 8258 |
178 |
return resolve().getSuperClass(); |
| 8259 |
|
} |
| 8260 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8261 |
251 |
@Override... |
| 8262 |
|
public TypeList.Generic getInterfaces() { |
| 8263 |
251 |
return resolve().getInterfaces(); |
| 8264 |
|
} |
| 8265 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8266 |
203 |
@Override... |
| 8267 |
|
public FieldList<FieldDescription.InDefinedShape> getDeclaredFields() { |
| 8268 |
203 |
return resolve().getDeclaredFields(); |
| 8269 |
|
} |
| 8270 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8271 |
267 |
@Override... |
| 8272 |
|
public MethodList<MethodDescription.InDefinedShape> getDeclaredMethods() { |
| 8273 |
267 |
return resolve().getDeclaredMethods(); |
| 8274 |
|
} |
| 8275 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8276 |
88 |
@Override... |
| 8277 |
|
public TypeDescription getDeclaringType() { |
| 8278 |
88 |
return resolve().getDeclaringType(); |
| 8279 |
|
} |
| 8280 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8281 |
85 |
@Override... |
| 8282 |
|
public MethodDescription getEnclosingMethod() { |
| 8283 |
85 |
return resolve().getEnclosingMethod(); |
| 8284 |
|
} |
| 8285 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8286 |
85 |
@Override... |
| 8287 |
|
public TypeDescription getEnclosingType() { |
| 8288 |
85 |
return resolve().getEnclosingType(); |
| 8289 |
|
} |
| 8290 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8291 |
82 |
@Override... |
| 8292 |
|
public TypeList getDeclaredTypes() { |
| 8293 |
82 |
return resolve().getDeclaredTypes(); |
| 8294 |
|
} |
| 8295 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8296 |
90 |
@Override... |
| 8297 |
|
public boolean isAnonymousClass() { |
| 8298 |
90 |
return resolve().isAnonymousClass(); |
| 8299 |
|
} |
| 8300 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8301 |
89 |
@Override... |
| 8302 |
|
public boolean isLocalClass() { |
| 8303 |
89 |
return resolve().isLocalClass(); |
| 8304 |
|
} |
| 8305 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8306 |
84 |
@Override... |
| 8307 |
|
public boolean isMemberClass() { |
| 8308 |
84 |
return resolve().isMemberClass(); |
| 8309 |
|
} |
| 8310 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8311 |
7 |
@Override... |
| 8312 |
|
public PackageDescription getPackage() { |
| 8313 |
7 |
return resolve().getPackage(); |
| 8314 |
|
} |
| 8315 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8316 |
259 |
@Override... |
| 8317 |
|
public AnnotationList getDeclaredAnnotations() { |
| 8318 |
259 |
return resolve().getDeclaredAnnotations(); |
| 8319 |
|
} |
| 8320 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8321 |
172 |
@Override... |
| 8322 |
|
public TypeList.Generic getTypeVariables() { |
| 8323 |
172 |
return resolve().getTypeVariables(); |
| 8324 |
|
} |
| 8325 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8326 |
162 |
@Override... |
| 8327 |
|
public int getModifiers() { |
| 8328 |
162 |
return resolve().getModifiers(); |
| 8329 |
|
} |
| 8330 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8331 |
49063 |
@Override... |
| 8332 |
|
public String getName() { |
| 8333 |
49063 |
return name; |
| 8334 |
|
} |
| 8335 |
|
} |
| 8336 |
|
} |
| 8337 |
|
} |
| 8338 |
|
|
| 8339 |
|
|
| 8340 |
|
|
| 8341 |
|
|
| |
|
| 92.1% |
Uncovered Elements: 3 (38) |
Complexity: 15 |
Complexity Density: 0.75 |
|
| 8342 |
|
class ClassLoading extends AbstractBase.Hierarchical { |
| 8343 |
|
|
| 8344 |
|
|
| 8345 |
|
|
| 8346 |
|
|
| 8347 |
|
private final ClassLoader classLoader; |
| 8348 |
|
|
| 8349 |
|
|
| 8350 |
|
|
| 8351 |
|
|
| 8352 |
|
@param |
| 8353 |
|
@param |
| 8354 |
|
@param |
| 8355 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 8356 |
25266 |
public ClassLoading(CacheProvider cacheProvider, TypePool parent, ClassLoader classLoader) {... |
| 8357 |
25266 |
super(cacheProvider, parent); |
| 8358 |
25266 |
this.classLoader = classLoader; |
| 8359 |
|
} |
| 8360 |
|
|
| 8361 |
|
|
| 8362 |
|
|
| 8363 |
|
|
| 8364 |
|
@param |
| 8365 |
|
@return |
| 8366 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8367 |
903 |
public static TypePool of(ClassLoader classLoader) {... |
| 8368 |
903 |
return of(classLoader, Empty.INSTANCE); |
| 8369 |
|
} |
| 8370 |
|
|
| 8371 |
|
|
| 8372 |
|
|
| 8373 |
|
|
| 8374 |
|
@param |
| 8375 |
|
@param |
| 8376 |
|
@return |
| 8377 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8378 |
25256 |
public static TypePool of(ClassLoader classLoader, TypePool parent) {... |
| 8379 |
25256 |
return new ClassLoading(CacheProvider.NoOp.INSTANCE, parent, classLoader); |
| 8380 |
|
} |
| 8381 |
|
|
| 8382 |
|
|
| 8383 |
|
|
| 8384 |
|
|
| 8385 |
|
@return |
| 8386 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8387 |
901 |
public static TypePool ofClassPath() {... |
| 8388 |
901 |
return of(ClassLoader.getSystemClassLoader()); |
| 8389 |
|
} |
| 8390 |
|
|
| |
|
| 66.7% |
Uncovered Elements: 1 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 8391 |
8 |
@Override... |
| 8392 |
|
public Resolution doDescribe(String name) { |
| 8393 |
8 |
try { |
| 8394 |
8 |
return new Resolution.Simple(new TypeDescription.ForLoadedType(Class.forName(name, false, classLoader))); |
| 8395 |
|
} catch (ClassNotFoundException ignored) { |
| 8396 |
0 |
return new Resolution.Illegal(name); |
| 8397 |
|
} |
| 8398 |
|
} |
| 8399 |
|
|
| |
|
| 93.8% |
Uncovered Elements: 1 (16) |
Complexity: 6 |
Complexity Density: 0.75 |
|
| 8400 |
14 |
@Override... |
| 8401 |
|
public boolean equals(Object other) { |
| 8402 |
2 |
if (this == other) return true; |
| 8403 |
4 |
if (other == null || getClass() != other.getClass()) return false; |
| 8404 |
4 |
if (!super.equals(other)) return false; |
| 8405 |
4 |
ClassLoading that = (ClassLoading) other; |
| 8406 |
4 |
return !(classLoader != null ? !classLoader.equals(that.classLoader) : that.classLoader != null); |
| 8407 |
|
} |
| 8408 |
|
|
| |
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 8409 |
10 |
@Override... |
| 8410 |
|
public int hashCode() { |
| 8411 |
10 |
int result = super.hashCode(); |
| 8412 |
10 |
result = 31 * result + (classLoader != null ? classLoader.hashCode() : 0); |
| 8413 |
10 |
return result; |
| 8414 |
|
} |
| 8415 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8416 |
10 |
@Override... |
| 8417 |
|
public String toString() { |
| 8418 |
10 |
return "TypePool.ClassLoading{" + |
| 8419 |
|
", cacheProvider=" + cacheProvider + |
| 8420 |
|
", classLoader=" + classLoader + |
| 8421 |
|
'}'; |
| 8422 |
|
} |
| 8423 |
|
} |
| 8424 |
|
|
| 8425 |
|
|
| 8426 |
|
|
| 8427 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (16) |
Complexity: 6 |
Complexity Density: 0.67 |
|
| 8428 |
|
class Explicit extends AbstractBase.Hierarchical { |
| 8429 |
|
|
| 8430 |
|
|
| 8431 |
|
|
| 8432 |
|
|
| 8433 |
|
private final Map<String, TypeDescription> precomputed; |
| 8434 |
|
|
| 8435 |
|
|
| 8436 |
|
|
| 8437 |
|
|
| 8438 |
|
@param |
| 8439 |
|
@param |
| 8440 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 8441 |
8 |
public Explicit(TypePool parent, Map<String, TypeDescription> precomputed) {... |
| 8442 |
8 |
super(CacheProvider.NoOp.INSTANCE, parent); |
| 8443 |
8 |
this.precomputed = precomputed; |
| 8444 |
|
} |
| 8445 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
| 8446 |
2 |
@Override... |
| 8447 |
|
protected Resolution doDescribe(String name) { |
| 8448 |
2 |
TypeDescription typeDescription = precomputed.get(name); |
| 8449 |
2 |
return typeDescription == null |
| 8450 |
|
? new Resolution.Illegal(name) |
| 8451 |
|
: new Resolution.Simple(typeDescription); |
| 8452 |
|
} |
| 8453 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8454 |
6 |
@Override... |
| 8455 |
|
public boolean equals(Object other) { |
| 8456 |
6 |
return this == other || !(other == null || getClass() != other.getClass()) |
| 8457 |
|
&& super.equals(other) |
| 8458 |
|
&& precomputed.equals(((Explicit) other).precomputed); |
| 8459 |
|
} |
| 8460 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 8461 |
4 |
@Override... |
| 8462 |
|
public int hashCode() { |
| 8463 |
4 |
int result = super.hashCode(); |
| 8464 |
4 |
result = 31 * result + precomputed.hashCode(); |
| 8465 |
4 |
return result; |
| 8466 |
|
} |
| 8467 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 8468 |
5 |
@Override... |
| 8469 |
|
public String toString() { |
| 8470 |
5 |
return "TypePool.Explicit{" + |
| 8471 |
|
"cacheProvider=" + cacheProvider + |
| 8472 |
|
", precomputed=" + precomputed + |
| 8473 |
|
'}'; |
| 8474 |
|
} |
| 8475 |
|
} |
| 8476 |
|
} |